Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(713)

Side by Side Diff: src/isolate.cc

Issue 501323002: Replace our homegrown ARRAY_SIZE() with Chrome's arraysize(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "src/ast.h" 9 #include "src/ast.h"
10 #include "src/base/platform/platform.h" 10 #include "src/base/platform/platform.h"
(...skipping 2251 matching lines...) Expand 10 before | Expand all | Expand 10 after
2262 2262
2263 Handle<JSObject> Isolate::GetSymbolRegistry() { 2263 Handle<JSObject> Isolate::GetSymbolRegistry() {
2264 if (heap()->symbol_registry()->IsUndefined()) { 2264 if (heap()->symbol_registry()->IsUndefined()) {
2265 Handle<Map> map = factory()->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize); 2265 Handle<Map> map = factory()->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize);
2266 Handle<JSObject> registry = factory()->NewJSObjectFromMap(map); 2266 Handle<JSObject> registry = factory()->NewJSObjectFromMap(map);
2267 heap()->set_symbol_registry(*registry); 2267 heap()->set_symbol_registry(*registry);
2268 2268
2269 static const char* nested[] = { 2269 static const char* nested[] = {
2270 "for", "for_api", "for_intern", "keyFor", "private_api", "private_intern" 2270 "for", "for_api", "for_intern", "keyFor", "private_api", "private_intern"
2271 }; 2271 };
2272 for (unsigned i = 0; i < ARRAY_SIZE(nested); ++i) { 2272 for (unsigned i = 0; i < arraysize(nested); ++i) {
2273 Handle<String> name = factory()->InternalizeUtf8String(nested[i]); 2273 Handle<String> name = factory()->InternalizeUtf8String(nested[i]);
2274 Handle<JSObject> obj = factory()->NewJSObjectFromMap(map); 2274 Handle<JSObject> obj = factory()->NewJSObjectFromMap(map);
2275 JSObject::NormalizeProperties(obj, KEEP_INOBJECT_PROPERTIES, 8); 2275 JSObject::NormalizeProperties(obj, KEEP_INOBJECT_PROPERTIES, 8);
2276 JSObject::SetProperty(registry, name, obj, STRICT).Assert(); 2276 JSObject::SetProperty(registry, name, obj, STRICT).Assert();
2277 } 2277 }
2278 } 2278 }
2279 return Handle<JSObject>::cast(factory()->symbol_registry()); 2279 return Handle<JSObject>::cast(factory()->symbol_registry());
2280 } 2280 }
2281 2281
2282 2282
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
2415 if (prev_ && prev_->Intercept(flag)) return true; 2415 if (prev_ && prev_->Intercept(flag)) return true;
2416 // Then check whether this scope intercepts. 2416 // Then check whether this scope intercepts.
2417 if ((flag & intercept_mask_)) { 2417 if ((flag & intercept_mask_)) {
2418 intercepted_flags_ |= flag; 2418 intercepted_flags_ |= flag;
2419 return true; 2419 return true;
2420 } 2420 }
2421 return false; 2421 return false;
2422 } 2422 }
2423 2423
2424 } } // namespace v8::internal 2424 } } // namespace v8::internal
OLDNEW
« src/base/macros.h ('K') | « src/ia32/code-stubs-ia32.cc ('k') | src/jsregexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698