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

Unified Diff: src/x64/stub-cache-x64.cc

Issue 16826016: Implement IC support for Constant Function transitions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/property.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/stub-cache-x64.cc
diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc
index c1059050ce16799d123f6d9dfececc37b58baade..dce2a7e2e8dba1759c2b354e5a0cb6aed9288252 100644
--- a/src/x64/stub-cache-x64.cc
+++ b/src/x64/stub-cache-x64.cc
@@ -817,7 +817,13 @@ void StubCompiler::GenerateStoreTransition(MacroAssembler* masm,
Register storage_reg = name_reg;
- if (FLAG_track_fields && representation.IsSmi()) {
+ if (details.type() == CONSTANT_FUNCTION) {
+ Handle<HeapObject> constant(
+ HeapObject::cast(descriptors->GetValue(descriptor)));
+ __ LoadHeapObject(scratch1, constant);
+ __ cmpq(value_reg, scratch1);
+ __ j(not_equal, miss_restore_name);
+ } else if (FLAG_track_fields && representation.IsSmi()) {
__ JumpIfNotSmi(value_reg, miss_restore_name);
} else if (FLAG_track_heap_object_fields && representation.IsHeapObject()) {
__ JumpIfSmi(value_reg, miss_restore_name);
@@ -873,6 +879,8 @@ void StubCompiler::GenerateStoreTransition(MacroAssembler* masm,
OMIT_REMEMBERED_SET,
OMIT_SMI_CHECK);
+ if (details.type() == CONSTANT_FUNCTION) return;
+
int index = transition->instance_descriptors()->GetFieldIndex(
transition->LastAdded());
« no previous file with comments | « src/property.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698