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

Side by Side Diff: src/isolate.cc

Issue 1144183004: [strong] Refactor ObjectStrength into a replacement for strong boolean args (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cl feedback and rebase Created 5 years, 6 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
« no previous file with comments | « src/isolate.h ('k') | src/json-parser.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <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 2361 matching lines...) Expand 10 before | Expand all | Expand 10 after
2372 return htracer(); 2372 return htracer();
2373 } 2373 }
2374 2374
2375 2375
2376 CodeTracer* Isolate::GetCodeTracer() { 2376 CodeTracer* Isolate::GetCodeTracer() {
2377 if (code_tracer() == NULL) set_code_tracer(new CodeTracer(id())); 2377 if (code_tracer() == NULL) set_code_tracer(new CodeTracer(id()));
2378 return code_tracer(); 2378 return code_tracer();
2379 } 2379 }
2380 2380
2381 2381
2382 Map* Isolate::get_initial_js_array_map(ElementsKind kind, 2382 Map* Isolate::get_initial_js_array_map(ElementsKind kind, Strength strength) {
2383 ObjectStrength strength) {
2384 Context* native_context = context()->native_context(); 2383 Context* native_context = context()->native_context();
2385 Object* maybe_map_array = strength ? native_context->js_array_strong_maps() 2384 Object* maybe_map_array = is_strong(strength)
2386 : native_context->js_array_maps(); 2385 ? native_context->js_array_strong_maps()
2386 : native_context->js_array_maps();
2387 if (!maybe_map_array->IsUndefined()) { 2387 if (!maybe_map_array->IsUndefined()) {
2388 Object* maybe_transitioned_map = 2388 Object* maybe_transitioned_map =
2389 FixedArray::cast(maybe_map_array)->get(kind); 2389 FixedArray::cast(maybe_map_array)->get(kind);
2390 if (!maybe_transitioned_map->IsUndefined()) { 2390 if (!maybe_transitioned_map->IsUndefined()) {
2391 return Map::cast(maybe_transitioned_map); 2391 return Map::cast(maybe_transitioned_map);
2392 } 2392 }
2393 } 2393 }
2394 return NULL; 2394 return NULL;
2395 } 2395 }
2396 2396
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
2799 // Then check whether this scope intercepts. 2799 // Then check whether this scope intercepts.
2800 if ((flag & intercept_mask_)) { 2800 if ((flag & intercept_mask_)) {
2801 intercepted_flags_ |= flag; 2801 intercepted_flags_ |= flag;
2802 return true; 2802 return true;
2803 } 2803 }
2804 return false; 2804 return false;
2805 } 2805 }
2806 2806
2807 } // namespace internal 2807 } // namespace internal
2808 } // namespace v8 2808 } // namespace v8
OLDNEW
« no previous file with comments | « src/isolate.h ('k') | src/json-parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698