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

Unified Diff: src/arm/code-stubs-arm.cc

Issue 181283003: Symbols for type cells. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments. Created 6 years, 10 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/arm/builtins-arm.cc ('k') | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/code-stubs-arm.cc
diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc
index ac46fe8c12e8f5c668827cb7caa1bce5ed8aa56c..0cf6e26a53eead3c960a1846d2a20e0a2fbf4f8f 100644
--- a/src/arm/code-stubs-arm.cc
+++ b/src/arm/code-stubs-arm.cc
@@ -3015,9 +3015,9 @@ static void GenerateRecordCallTarget(MacroAssembler* masm) {
Label initialize, done, miss, megamorphic, not_array_function;
ASSERT_EQ(*TypeFeedbackInfo::MegamorphicSentinel(masm->isolate()),
- masm->isolate()->heap()->undefined_value());
+ masm->isolate()->heap()->megamorphic_symbol());
ASSERT_EQ(*TypeFeedbackInfo::UninitializedSentinel(masm->isolate()),
- masm->isolate()->heap()->the_hole_value());
+ masm->isolate()->heap()->uninitialized_symbol());
// Load the cache state into r4.
__ add(r4, r2, Operand::PointerOffsetFromSmiKey(r3));
@@ -3046,13 +3046,13 @@ static void GenerateRecordCallTarget(MacroAssembler* masm) {
// A monomorphic miss (i.e, here the cache is not uninitialized) goes
// megamorphic.
- __ CompareRoot(r4, Heap::kTheHoleValueRootIndex);
+ __ CompareRoot(r4, Heap::kUninitializedSymbolRootIndex);
__ b(eq, &initialize);
// MegamorphicSentinel is an immortal immovable object (undefined) so no
// write-barrier is needed.
__ bind(&megamorphic);
__ add(r4, r2, Operand::PointerOffsetFromSmiKey(r3));
- __ LoadRoot(ip, Heap::kUndefinedValueRootIndex);
+ __ LoadRoot(ip, Heap::kMegamorphicSymbolRootIndex);
__ str(ip, FieldMemOperand(r4, FixedArray::kHeaderSize));
__ jmp(&done);
@@ -3099,7 +3099,8 @@ static void GenerateRecordCallTarget(MacroAssembler* masm) {
void CallFunctionStub::Generate(MacroAssembler* masm) {
// r1 : the function to call
// r2 : feedback vector
- // r3 : (only if r2 is not undefined) slot in feedback vector (Smi)
+ // r3 : (only if r2 is not the megamorphic symbol) slot in feedback
+ // vector (Smi)
Label slow, non_function, wrap, cont;
if (NeedsChecks()) {
@@ -3155,11 +3156,11 @@ void CallFunctionStub::Generate(MacroAssembler* masm) {
if (RecordCallTarget()) {
// If there is a call target cache, mark it megamorphic in the
// non-function case. MegamorphicSentinel is an immortal immovable
- // object (undefined) so no write barrier is needed.
+ // object (megamorphic symbol) so no write barrier is needed.
ASSERT_EQ(*TypeFeedbackInfo::MegamorphicSentinel(masm->isolate()),
- masm->isolate()->heap()->undefined_value());
+ masm->isolate()->heap()->megamorphic_symbol());
__ add(r5, r2, Operand::PointerOffsetFromSmiKey(r3));
- __ LoadRoot(ip, Heap::kUndefinedValueRootIndex);
+ __ LoadRoot(ip, Heap::kMegamorphicSymbolRootIndex);
__ str(ip, FieldMemOperand(r5, FixedArray::kHeaderSize));
}
// Check for function proxy.
@@ -3204,7 +3205,8 @@ void CallConstructStub::Generate(MacroAssembler* masm) {
// r0 : number of arguments
// r1 : the function to call
// r2 : feedback vector
- // r3 : (only if r2 is not undefined) slot in feedback vector (Smi)
+ // r3 : (only if r2 is not the megamorphic symbol) slot in feedback
+ // vector (Smi)
Label slow, non_function_call;
// Check that the function is not a smi.
@@ -5297,11 +5299,15 @@ void ArrayConstructorStub::Generate(MacroAssembler* masm) {
// ----------- S t a t e -------------
// -- r0 : argc (only if argument_count_ == ANY)
// -- r1 : constructor
- // -- r2 : feedback vector (fixed array or undefined)
+ // -- r2 : feedback vector (fixed array or megamorphic symbol)
// -- r3 : slot index (if r2 is fixed array)
// -- sp[0] : return address
// -- sp[4] : last argument
// -----------------------------------
+
+ ASSERT_EQ(*TypeFeedbackInfo::MegamorphicSentinel(masm->isolate()),
+ masm->isolate()->heap()->megamorphic_symbol());
+
if (FLAG_debug_code) {
// The array construct code is only set for the global and natives
// builtin Array functions which always have maps.
@@ -5314,10 +5320,11 @@ void ArrayConstructorStub::Generate(MacroAssembler* masm) {
__ CompareObjectType(r4, r4, r5, MAP_TYPE);
__ Assert(eq, kUnexpectedInitialMapForArrayFunction);
- // We should either have undefined in ebx or a valid fixed array.
+ // We should either have the megamorphic symbol in ebx or a valid
+ // fixed array.
Label okay_here;
Handle<Map> fixed_array_map = masm->isolate()->factory()->fixed_array_map();
- __ CompareRoot(r2, Heap::kUndefinedValueRootIndex);
+ __ CompareRoot(r2, Heap::kMegamorphicSymbolRootIndex);
__ b(eq, &okay_here);
__ ldr(r4, FieldMemOperand(r2, 0));
__ cmp(r4, Operand(fixed_array_map));
@@ -5331,7 +5338,7 @@ void ArrayConstructorStub::Generate(MacroAssembler* masm) {
Label no_info;
// Get the elements kind and case on that.
- __ CompareRoot(r2, Heap::kUndefinedValueRootIndex);
+ __ CompareRoot(r2, Heap::kMegamorphicSymbolRootIndex);
__ b(eq, &no_info);
__ add(r2, r2, Operand::PointerOffsetFromSmiKey(r3));
__ ldr(r2, FieldMemOperand(r2, FixedArray::kHeaderSize));
« no previous file with comments | « src/arm/builtins-arm.cc ('k') | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698