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

Unified Diff: src/ic.h

Issue 6529055: [Isolates] Merge crankshaft (r5922 from bleeding_edge). (Closed)
Patch Set: Win32 port Created 9 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/ia32/stub-cache-ia32.cc ('k') | src/ic.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic.h
diff --git a/src/ic.h b/src/ic.h
index 00470770ff479110cbcb8c201ffb4621927384ef..a6d8068b3011c495d18076fcedeee2d35e1a94e8 100644
--- a/src/ic.h
+++ b/src/ic.h
@@ -28,7 +28,7 @@
#ifndef V8_IC_H_
#define V8_IC_H_
-#include "assembler.h"
+#include "macro-assembler.h"
namespace v8 {
namespace internal {
@@ -53,8 +53,9 @@ namespace internal {
ICU(LoadPropertyWithInterceptorForCall) \
ICU(KeyedLoadPropertyWithInterceptor) \
ICU(StoreInterceptorProperty) \
- ICU(BinaryOp_Patch)
-
+ ICU(BinaryOp_Patch) \
+ ICU(TypeRecordingBinaryOp_Patch) \
+ ICU(CompareIC_Miss)
//
// IC is the base class for LoadIC, StoreIC, CallIC, KeyedLoadIC,
// and KeyedStoreIC.
@@ -425,6 +426,7 @@ class StoreIC: public IC {
static void GenerateMegamorphic(MacroAssembler* masm);
static void GenerateArrayLength(MacroAssembler* masm);
static void GenerateNormal(MacroAssembler* masm);
+ static void GenerateGlobalProxy(MacroAssembler* masm);
// Clear the use of an inlined version.
static void ClearInlinedVersion(Address address);
@@ -450,6 +452,10 @@ class StoreIC: public IC {
return Isolate::Current()->builtins()->builtin(
Builtins::StoreIC_Initialize);
}
+ static Code* global_proxy_stub() {
+ return Isolate::Current()->builtins()->builtin(
+ Builtins::StoreIC_GlobalProxy);
+ }
static void Clear(Address address, Code* target);
@@ -530,6 +536,7 @@ class BinaryOpIC: public IC {
public:
enum TypeInfo {
+ UNINIT_OR_SMI,
DEFAULT, // Initial state. When first executed, patches to one
// of the following states depending on the operands types.
HEAP_NUMBERS, // Both arguments are HeapNumbers.
@@ -541,8 +548,6 @@ class BinaryOpIC: public IC {
void patch(Code* code);
- static void Clear(Address address, Code* target);
-
static const char* GetName(TypeInfo type_info);
static State ToState(TypeInfo type_info);
@@ -550,6 +555,72 @@ class BinaryOpIC: public IC {
static TypeInfo GetTypeInfo(Object* left, Object* right);
};
+
+// Type Recording BinaryOpIC, that records the types of the inputs and outputs.
+class TRBinaryOpIC: public IC {
+ public:
+
+ enum TypeInfo {
+ UNINITIALIZED,
+ SMI,
+ INT32,
+ HEAP_NUMBER,
+ STRING, // Only used for addition operation. At least one string operand.
+ GENERIC
+ };
+
+ explicit TRBinaryOpIC(Isolate* isolate) : IC(NO_EXTRA_FRAME, isolate) { }
+
+ void patch(Code* code);
+
+ static const char* GetName(TypeInfo type_info);
+
+ static State ToState(TypeInfo type_info);
+
+ static TypeInfo GetTypeInfo(Handle<Object> left, Handle<Object> right);
+
+ static TypeInfo JoinTypes(TypeInfo x, TypeInfo y);
+};
+
+
+class CompareIC: public IC {
+ public:
+ enum State {
+ UNINITIALIZED,
+ SMIS,
+ HEAP_NUMBERS,
+ OBJECTS,
+ GENERIC
+ };
+
+ CompareIC(Isolate* isolate, Token::Value op)
+ : IC(EXTRA_CALL_FRAME, isolate), op_(op) { }
+
+ // Update the inline cache for the given operands.
+ void UpdateCaches(Handle<Object> x, Handle<Object> y);
+
+ // Factory method for getting an uninitialized compare stub.
+ static Handle<Code> GetUninitialized(Token::Value op);
+
+ // Helper function for computing the condition for a compare operation.
+ static Condition ComputeCondition(Token::Value op);
+
+ // Helper function for determining the state of a compare IC.
+ static State ComputeState(Code* target);
+
+ static const char* GetStateName(State state);
+
+ private:
+ State TargetState(Handle<Object> x, Handle<Object> y);
+
+ bool strict() const { return op_ == Token::EQ_STRICT; }
+ Condition GetCondition() const { return ComputeCondition(op_); }
+ State GetState() { return ComputeState(target()); }
+
+ Token::Value op_;
+};
+
+
} } // namespace v8::internal
#endif // V8_IC_H_
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698