OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <stdlib.h> | 5 #include <stdlib.h> |
6 | 6 |
7 #include <fstream> // NOLINT(readability/streams) | 7 #include <fstream> // NOLINT(readability/streams) |
8 #include <sstream> | 8 #include <sstream> |
9 | 9 |
10 #include "src/v8.h" | 10 #include "src/v8.h" |
(...skipping 2330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2341 #undef ISOLATE_FIELD_OFFSET | 2341 #undef ISOLATE_FIELD_OFFSET |
2342 #endif | 2342 #endif |
2343 | 2343 |
2344 | 2344 |
2345 Handle<JSObject> Isolate::GetSymbolRegistry() { | 2345 Handle<JSObject> Isolate::GetSymbolRegistry() { |
2346 if (heap()->symbol_registry()->IsSmi()) { | 2346 if (heap()->symbol_registry()->IsSmi()) { |
2347 Handle<Map> map = factory()->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize); | 2347 Handle<Map> map = factory()->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize); |
2348 Handle<JSObject> registry = factory()->NewJSObjectFromMap(map); | 2348 Handle<JSObject> registry = factory()->NewJSObjectFromMap(map); |
2349 heap()->set_symbol_registry(*registry); | 2349 heap()->set_symbol_registry(*registry); |
2350 | 2350 |
2351 static const char* nested[] = { | 2351 static const char* nested[] = {"for", "for_api", "keyFor", "private_api", |
2352 "for", "for_api", "for_intern", "keyFor", "private_api", "private_intern" | 2352 "private_intern"}; |
2353 }; | |
2354 for (unsigned i = 0; i < arraysize(nested); ++i) { | 2353 for (unsigned i = 0; i < arraysize(nested); ++i) { |
2355 Handle<String> name = factory()->InternalizeUtf8String(nested[i]); | 2354 Handle<String> name = factory()->InternalizeUtf8String(nested[i]); |
2356 Handle<JSObject> obj = factory()->NewJSObjectFromMap(map); | 2355 Handle<JSObject> obj = factory()->NewJSObjectFromMap(map); |
2357 JSObject::NormalizeProperties(obj, KEEP_INOBJECT_PROPERTIES, 8, | 2356 JSObject::NormalizeProperties(obj, KEEP_INOBJECT_PROPERTIES, 8, |
2358 "SetupSymbolRegistry"); | 2357 "SetupSymbolRegistry"); |
2359 JSObject::SetProperty(registry, name, obj, STRICT).Assert(); | 2358 JSObject::SetProperty(registry, name, obj, STRICT).Assert(); |
2360 } | 2359 } |
2361 } | 2360 } |
2362 return Handle<JSObject>::cast(factory()->symbol_registry()); | 2361 return Handle<JSObject>::cast(factory()->symbol_registry()); |
2363 } | 2362 } |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2535 if (prev_ && prev_->Intercept(flag)) return true; | 2534 if (prev_ && prev_->Intercept(flag)) return true; |
2536 // Then check whether this scope intercepts. | 2535 // Then check whether this scope intercepts. |
2537 if ((flag & intercept_mask_)) { | 2536 if ((flag & intercept_mask_)) { |
2538 intercepted_flags_ |= flag; | 2537 intercepted_flags_ |= flag; |
2539 return true; | 2538 return true; |
2540 } | 2539 } |
2541 return false; | 2540 return false; |
2542 } | 2541 } |
2543 | 2542 |
2544 } } // namespace v8::internal | 2543 } } // namespace v8::internal |
OLD | NEW |