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

Side by Side Diff: src/objects.cc

Issue 1151853003: [strong] create strong array literals Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix a test Created 5 years, 7 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/mips64/full-codegen-mips64.cc ('k') | src/runtime/runtime.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 <iomanip> 5 #include <iomanip>
6 #include <sstream> 6 #include <sstream>
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/accessors.h" 10 #include "src/accessors.h"
(...skipping 10367 matching lines...) Expand 10 before | Expand all | Expand 10 after
10378 10378
10379 // If the function is used as the global Array function, cache the 10379 // If the function is used as the global Array function, cache the
10380 // updated initial maps (and transitioned versions) in the native context. 10380 // updated initial maps (and transitioned versions) in the native context.
10381 Handle<Context> native_context(function->context()->native_context(), 10381 Handle<Context> native_context(function->context()->native_context(),
10382 isolate); 10382 isolate);
10383 Handle<Object> array_function( 10383 Handle<Object> array_function(
10384 native_context->get(Context::ARRAY_FUNCTION_INDEX), isolate); 10384 native_context->get(Context::ARRAY_FUNCTION_INDEX), isolate);
10385 if (array_function->IsJSFunction() && 10385 if (array_function->IsJSFunction() &&
10386 *function == JSFunction::cast(*array_function)) { 10386 *function == JSFunction::cast(*array_function)) {
10387 CacheInitialJSArrayMaps(native_context, new_map); 10387 CacheInitialJSArrayMaps(native_context, new_map);
10388 Handle<Map> new_strong_map = 10388 Handle<Map> new_strong_map = Map::Copy(new_map, "SetInstancePrototype");
10389 Map::Copy(initial_map, "SetInstancePrototype");
10390 new_strong_map->set_is_strong(); 10389 new_strong_map->set_is_strong();
10391 CacheInitialJSArrayMaps(native_context, new_strong_map); 10390 CacheInitialJSArrayMaps(native_context, new_strong_map);
10392 } 10391 }
10393 } 10392 }
10394 10393
10395 // Deoptimize all code that embeds the previous initial map. 10394 // Deoptimize all code that embeds the previous initial map.
10396 initial_map->dependent_code()->DeoptimizeDependentCodeGroup( 10395 initial_map->dependent_code()->DeoptimizeDependentCodeGroup(
10397 isolate, DependentCode::kInitialMapChangedGroup); 10396 isolate, DependentCode::kInitialMapChangedGroup);
10398 } else { 10397 } else {
10399 // Put the value in the initial map field until an initial map is 10398 // Put the value in the initial map field until an initial map is
(...skipping 6928 matching lines...) Expand 10 before | Expand all | Expand 10 after
17328 void PropertyCell::SetValueWithInvalidation(Handle<PropertyCell> cell, 17327 void PropertyCell::SetValueWithInvalidation(Handle<PropertyCell> cell,
17329 Handle<Object> new_value) { 17328 Handle<Object> new_value) {
17330 if (cell->value() != *new_value) { 17329 if (cell->value() != *new_value) {
17331 cell->set_value(*new_value); 17330 cell->set_value(*new_value);
17332 Isolate* isolate = cell->GetIsolate(); 17331 Isolate* isolate = cell->GetIsolate();
17333 cell->dependent_code()->DeoptimizeDependentCodeGroup( 17332 cell->dependent_code()->DeoptimizeDependentCodeGroup(
17334 isolate, DependentCode::kPropertyCellChangedGroup); 17333 isolate, DependentCode::kPropertyCellChangedGroup);
17335 } 17334 }
17336 } 17335 }
17337 } } // namespace v8::internal 17336 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips64/full-codegen-mips64.cc ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698