File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
graal-js/src/com.oracle.truffle.js/src/com/oracle/truffle/js/runtime/builtins Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 6262import com .oracle .truffle .api .object .LocationModifier ;
6363import com .oracle .truffle .api .object .Property ;
6464import com .oracle .truffle .api .object .Shape ;
65+ import com .oracle .truffle .api .profiles .BranchProfile ;
6566import com .oracle .truffle .js .builtins .intl .CollatorFunctionBuiltins ;
6667import com .oracle .truffle .js .builtins .intl .CollatorPrototypeBuiltins ;
6768import com .oracle .truffle .js .lang .JavaScriptLanguage ;
@@ -348,6 +349,7 @@ private static CallTarget createGetCompareCallTarget(JSContext context) {
348349
349350 @ CompilationFinal private ContextReference <JSRealm > realmRef ;
350351 @ Child private PropertySetNode setBoundObjectNode = PropertySetNode .createSetHidden (BOUND_OBJECT_KEY , context );
352+ private final BranchProfile errorBranch = BranchProfile .create ();
351353
352354 @ Override
353355 public Object execute (VirtualFrame frame ) {
@@ -360,6 +362,7 @@ public Object execute(VirtualFrame frame) {
360362 InternalState state = getInternalState ((DynamicObject ) collatorObj );
361363
362364 if (state == null || !state .initializedCollator ) {
365+ errorBranch .enter ();
363366 throw Errors .createTypeErrorMethodCalledOnNonObjectOrWrongType ("compare" );
364367 }
365368
@@ -385,6 +388,7 @@ public Object execute(VirtualFrame frame) {
385388
386389 return state .boundCompareFunction ;
387390 }
391+ errorBranch .enter ();
388392 throw Errors .createTypeErrorTypeXExpected (CLASS_NAME );
389393 }
390394 });
You can’t perform that action at this time.
0 commit comments