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

Unified Diff: src/codegen-ia32.h

Issue 21392: Change compiler to safely write unsafe smis when they are spilled from... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: '' Created 11 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 | « no previous file | src/codegen-ia32.cc » ('j') | src/codegen-ia32.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codegen-ia32.h
===================================================================
--- src/codegen-ia32.h (revision 1293)
+++ src/codegen-ia32.h (working copy)
@@ -464,9 +464,15 @@
bool strict,
ControlDestination* destination);
- // Inline small integer literals. To prevent long attacker-controlled byte
- // sequences, we only inline small Smis.
+ // To prevent long attacker-controlled byte sequences, integer constants
+ // from the JavaScript source are loaded in two parts if they are larger
+ // than 16 bits.
static const int kMaxSmiInlinedBits = 16;
+ bool IsUnsafeSmi(Handle<Object> value);
+ // Load an integer constant x into a register target using
+ // at most 16 bits of user-controlled data per assembly operation.
+ void LoadUnsafeSmi(Register target, Handle<Object> value);
+
bool IsInlineSmi(Literal* literal);
void SmiComparison(Condition cc, Handle<Object> value, bool strict);
void SmiOperation(Token::Value op,
@@ -615,6 +621,7 @@
friend class VirtualFrame;
friend class JumpTarget;
friend class Reference;
+ friend class Result;
DISALLOW_COPY_AND_ASSIGN(CodeGenerator);
};
« no previous file with comments | « no previous file | src/codegen-ia32.cc » ('j') | src/codegen-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698