Index: src/contexts.cc |
diff --git a/src/contexts.cc b/src/contexts.cc |
index e3ace3c8c1e967a87d049578b6dc082e1bf8c6cf..0e89821c7f683e63517c5f0d003aac3d3896e1a4 100644 |
--- a/src/contexts.cc |
+++ b/src/contexts.cc |
@@ -244,7 +244,7 @@ Handle<Object> Context::Lookup(Handle<String> name, |
Handle<Context> context(this, isolate); |
bool follow_context_chain = (flags & FOLLOW_CONTEXT_CHAIN) != 0; |
- *index = -1; |
+ *index = kNotFound; |
*attributes = ABSENT; |
*binding_flags = MISSING_BINDING; |
@@ -537,6 +537,23 @@ Handle<Object> Context::ErrorMessageForCodeGenerationFromStrings() { |
} |
+#define COMPARE_NAME(index, type, name) \ |
+ if (string->IsOneByteEqualTo(STATIC_CHAR_VECTOR(#name))) return index; |
+ |
+int Context::ImportedFieldIndexForName(Handle<String> string) { |
+ NATIVE_CONTEXT_IMPORTED_FIELDS(COMPARE_NAME) |
+ return kNotFound; |
+} |
+ |
+ |
+int Context::IntrinsicIndexForName(Handle<String> string) { |
+ NATIVE_CONTEXT_INTRINSIC_FUNCTIONS(COMPARE_NAME); |
+ return kNotFound; |
+} |
+ |
+#undef COMPARE_NAME |
+ |
+ |
#ifdef DEBUG |
bool Context::IsBootstrappingOrValidParentContext( |
Object* object, Context* child) { |