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

Unified Diff: src/deoptimizer.h

Issue 10778029: Allow uint32 value on optimized frames if they are consumed by safe operations. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: arm and x64 ports Created 8 years, 4 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
Index: src/deoptimizer.h
diff --git a/src/deoptimizer.h b/src/deoptimizer.h
index e7b55b2a7760c00979719fdceac12fb51fe5ecbf..ee73df42af4ecd23eb0d1b657844f7fc5282e414 100644
--- a/src/deoptimizer.h
+++ b/src/deoptimizer.h
@@ -562,9 +562,11 @@ class Translation BASE_EMBEDDED {
ARGUMENTS_ADAPTOR_FRAME,
REGISTER,
INT32_REGISTER,
+ UINT32_REGISTER,
DOUBLE_REGISTER,
STACK_SLOT,
INT32_STACK_SLOT,
+ UINT32_STACK_SLOT,
DOUBLE_STACK_SLOT,
LITERAL,
ARGUMENTS_OBJECT,
@@ -592,9 +594,11 @@ class Translation BASE_EMBEDDED {
void BeginConstructStubFrame(int literal_id, unsigned height);
void StoreRegister(Register reg);
void StoreInt32Register(Register reg);
+ void StoreUint32Register(Register reg);
void StoreDoubleRegister(DoubleRegister reg);
void StoreStackSlot(int index);
void StoreInt32StackSlot(int index);
+ void StoreUint32StackSlot(int index);
void StoreDoubleStackSlot(int index);
void StoreLiteral(int literal_id);
void StoreArgumentsObject();
@@ -644,6 +648,7 @@ class SlotRef BASE_EMBEDDED {
UNKNOWN,
TAGGED,
INT32,
+ UINT32,
DOUBLE,
LITERAL
};
@@ -671,6 +676,16 @@ class SlotRef BASE_EMBEDDED {
}
}
+ case UINT32: {
+ uint32_t value = Memory::uint32_at(addr_);
+ if (value <= static_cast<uint32_t>(Smi::kMaxValue)) {
Massi 2012/08/16 13:57:55 Maybe having a Smi::IsValidUint(uint32_t value) me
+ return Handle<Object>(Smi::FromInt(static_cast<int>(value)));
+ } else {
+ return Isolate::Current()->factory()->NewNumber(
+ static_cast<double>(value));
+ }
+ }
+
case DOUBLE: {
double value = Memory::double_at(addr_);
return Isolate::Current()->factory()->NewNumber(value);
« no previous file with comments | « src/arm/simulator-arm.cc ('k') | src/deoptimizer.cc » ('j') | test/mjsunit/compiler/uint32.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698