Index: src/compiler/pipeline.cc |
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc |
index 12a0780021c15ec855017389c9743957ad62078a..978aeee94a8c3ba922a619b697c00477887b4d11 100644 |
--- a/src/compiler/pipeline.cc |
+++ b/src/compiler/pipeline.cc |
@@ -990,10 +990,8 @@ Handle<Code> Pipeline::GenerateCode() { |
// TODO(mstarzinger): This is just a temporary hack to make TurboFan work, |
// the correct solution is to restore the context register after invoking |
// builtins from full-codegen. |
- for (int i = 0; i < Builtins::NumberOfJavaScriptBuiltins(); i++) { |
- Builtins::JavaScript id = static_cast<Builtins::JavaScript>(i); |
- Object* builtin = isolate()->js_builtins_object()->javascript_builtin(id); |
- if (*info()->closure() == builtin) return Handle<Code>::null(); |
+ if (Context::IsJSBuiltin(isolate()->native_context(), info()->closure())) { |
+ return Handle<Code>::null(); |
} |
ZonePool zone_pool; |