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

Side by Side Diff: src/isolate.cc

Issue 1516433005: [contexts] Place the initial JSArray maps on the native context directly. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comment. Created 5 years 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/ia32/macro-assembler-ia32.cc ('k') | src/mips/macro-assembler-mips.cc » ('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 "src/isolate.h" 5 #include "src/isolate.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <fstream> // NOLINT(readability/streams) 9 #include <fstream> // NOLINT(readability/streams)
10 #include <sstream> 10 #include <sstream>
(...skipping 2367 matching lines...) Expand 10 before | Expand all | Expand 10 after
2378 } 2378 }
2379 2379
2380 2380
2381 CodeTracer* Isolate::GetCodeTracer() { 2381 CodeTracer* Isolate::GetCodeTracer() {
2382 if (code_tracer() == NULL) set_code_tracer(new CodeTracer(id())); 2382 if (code_tracer() == NULL) set_code_tracer(new CodeTracer(id()));
2383 return code_tracer(); 2383 return code_tracer();
2384 } 2384 }
2385 2385
2386 2386
2387 Map* Isolate::get_initial_js_array_map(ElementsKind kind, Strength strength) { 2387 Map* Isolate::get_initial_js_array_map(ElementsKind kind, Strength strength) {
2388 Context* native_context = context()->native_context(); 2388 if (IsFastElementsKind(kind)) {
2389 Object* maybe_map_array = is_strong(strength) 2389 DisallowHeapAllocation no_gc;
2390 ? native_context->js_array_strong_maps() 2390 Object* const initial_js_array_map = context()->native_context()->get(
2391 : native_context->js_array_maps(); 2391 Context::ArrayMapIndex(kind, strength));
2392 if (!maybe_map_array->IsUndefined()) { 2392 if (!initial_js_array_map->IsUndefined()) {
2393 Object* maybe_transitioned_map = 2393 return Map::cast(initial_js_array_map);
2394 FixedArray::cast(maybe_map_array)->get(kind);
2395 if (!maybe_transitioned_map->IsUndefined()) {
2396 return Map::cast(maybe_transitioned_map);
2397 } 2394 }
2398 } 2395 }
2399 return NULL; 2396 return nullptr;
2400 } 2397 }
2401 2398
2402 2399
2403 bool Isolate::use_crankshaft() const { 2400 bool Isolate::use_crankshaft() const {
2404 return FLAG_crankshaft && 2401 return FLAG_crankshaft &&
2405 !serializer_enabled_ && 2402 !serializer_enabled_ &&
2406 CpuFeatures::SupportsCrankshaft(); 2403 CpuFeatures::SupportsCrankshaft();
2407 } 2404 }
2408 2405
2409 2406
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
2812 // Then check whether this scope intercepts. 2809 // Then check whether this scope intercepts.
2813 if ((flag & intercept_mask_)) { 2810 if ((flag & intercept_mask_)) {
2814 intercepted_flags_ |= flag; 2811 intercepted_flags_ |= flag;
2815 return true; 2812 return true;
2816 } 2813 }
2817 return false; 2814 return false;
2818 } 2815 }
2819 2816
2820 } // namespace internal 2817 } // namespace internal
2821 } // namespace v8 2818 } // namespace v8
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/mips/macro-assembler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698