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

Side by Side Diff: src/ic/handler-compiler.cc

Issue 769733003: Do not embed constant functions in StoreTransition stub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Check that registers do not overlap Created 6 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/ic/handler-compiler.h ('k') | src/ic/ia32/handler-compiler-ia32.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/ic/call-optimization.h" 7 #include "src/ic/call-optimization.h"
8 #include "src/ic/handler-compiler.h" 8 #include "src/ic/handler-compiler.h"
9 #include "src/ic/ic.h" 9 #include "src/ic/ic.h"
10 #include "src/ic/ic-inl.h" 10 #include "src/ic/ic-inl.h"
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 DescriptorArray* descriptors = transition->instance_descriptors(); 333 DescriptorArray* descriptors = transition->instance_descriptors();
334 PropertyDetails details = descriptors->GetDetails(descriptor); 334 PropertyDetails details = descriptors->GetDetails(descriptor);
335 Representation representation = details.representation(); 335 Representation representation = details.representation();
336 DCHECK(!representation.IsNone()); 336 DCHECK(!representation.IsNone());
337 337
338 // Stub is never generated for objects that require access checks. 338 // Stub is never generated for objects that require access checks.
339 DCHECK(!transition->is_access_check_needed()); 339 DCHECK(!transition->is_access_check_needed());
340 340
341 // Call to respective StoreTransitionStub. 341 // Call to respective StoreTransitionStub.
342 if (details.type() == CONSTANT) { 342 if (details.type() == CONSTANT) {
343 GenerateConstantCheck(descriptors->GetValue(descriptor), value(), &miss);
344
345 GenerateRestoreMap(transition, scratch2(), &miss); 343 GenerateRestoreMap(transition, scratch2(), &miss);
344 DCHECK(descriptors->GetValue(descriptor)->IsJSFunction());
345 Register map_reg = StoreTransitionDescriptor::MapRegister();
346 GenerateConstantCheck(map_reg, descriptor, value(), scratch2(), &miss);
346 GenerateRestoreName(name); 347 GenerateRestoreName(name);
347 StoreTransitionStub stub(isolate()); 348 StoreTransitionStub stub(isolate());
348 GenerateTailCall(masm(), stub.GetCode()); 349 GenerateTailCall(masm(), stub.GetCode());
349 350
350 } else { 351 } else {
351 if (representation.IsHeapObject()) { 352 if (representation.IsHeapObject()) {
352 GenerateFieldTypeChecks(descriptors->GetFieldType(descriptor), value(), 353 GenerateFieldTypeChecks(descriptors->GetFieldType(descriptor), value(),
353 &miss); 354 &miss);
354 } 355 }
355 StoreTransitionStub::StoreMode store_mode = 356 StoreTransitionStub::StoreMode store_mode =
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 DCHECK(elements_kind == DICTIONARY_ELEMENTS); 436 DCHECK(elements_kind == DICTIONARY_ELEMENTS);
436 cached_stub = LoadDictionaryElementStub(isolate()).GetCode(); 437 cached_stub = LoadDictionaryElementStub(isolate()).GetCode();
437 } 438 }
438 } 439 }
439 440
440 handlers->Add(cached_stub); 441 handlers->Add(cached_stub);
441 } 442 }
442 } 443 }
443 } 444 }
444 } // namespace v8::internal 445 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ic/handler-compiler.h ('k') | src/ic/ia32/handler-compiler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698