| Index: src/type-info.h
|
| ===================================================================
|
| --- src/type-info.h (revision 6800)
|
| +++ src/type-info.h (working copy)
|
| @@ -120,9 +120,9 @@
|
| }
|
|
|
|
|
| - // Integer32 is an integer that can be represented as either a signed
|
| - // 32-bit integer or as an unsigned 32-bit integer. It has to be
|
| - // in the range [-2^31, 2^32 - 1]. We also have to check for negative 0
|
| + // Integer32 is an integer that can be represented as a signed
|
| + // 32-bit integer. It has to be
|
| + // in the range [-2^31, 2^31 - 1]. We also have to check for negative 0
|
| // as it is not an Integer32.
|
| static inline bool IsInt32Double(double value) {
|
| const DoubleRepresentation minus_zero(-0.0);
|
| @@ -219,6 +219,12 @@
|
| };
|
|
|
|
|
| +enum StringStubFeedback {
|
| + DEFAULT_STRING_STUB = 0,
|
| + STRING_INDEX_OUT_OF_BOUNDS = 1
|
| +};
|
| +
|
| +
|
| // Forward declarations.
|
| class Assignment;
|
| class BinaryOperation;
|
| @@ -230,38 +236,32 @@
|
|
|
| class TypeFeedbackOracle BASE_EMBEDDED {
|
| public:
|
| - enum Side {
|
| - LEFT,
|
| - RIGHT,
|
| - RESULT
|
| - };
|
| + TypeFeedbackOracle(Handle<Code> code, Handle<Context> global_context);
|
|
|
| - explicit TypeFeedbackOracle(Handle<Code> code);
|
| -
|
| bool LoadIsMonomorphic(Property* expr);
|
| bool StoreIsMonomorphic(Assignment* expr);
|
| bool CallIsMonomorphic(Call* expr);
|
|
|
| Handle<Map> LoadMonomorphicReceiverType(Property* expr);
|
| Handle<Map> StoreMonomorphicReceiverType(Assignment* expr);
|
| - Handle<Map> CallMonomorphicReceiverType(Call* expr);
|
|
|
| ZoneMapList* LoadReceiverTypes(Property* expr, Handle<String> name);
|
| ZoneMapList* StoreReceiverTypes(Assignment* expr, Handle<String> name);
|
| ZoneMapList* CallReceiverTypes(Call* expr, Handle<String> name);
|
|
|
| + CheckType GetCallCheckType(Call* expr);
|
| + Handle<JSObject> GetPrototypeForPrimitiveCheck(CheckType check);
|
| +
|
| bool LoadIsBuiltin(Property* expr, Builtins::Name id);
|
|
|
| // Get type information for arithmetic operations and compares.
|
| - TypeInfo BinaryType(BinaryOperation* expr, Side side);
|
| - TypeInfo CompareType(CompareOperation* expr, Side side);
|
| + TypeInfo BinaryType(BinaryOperation* expr);
|
| + TypeInfo CompareType(CompareOperation* expr);
|
| TypeInfo SwitchType(CaseClause* clause);
|
|
|
| private:
|
| void Initialize(Handle<Code> code);
|
|
|
| - bool IsMonomorphic(int pos) { return GetElement(map_, pos)->IsMap(); }
|
| -
|
| ZoneMapList* CollectReceiverTypes(int position,
|
| Handle<String> name,
|
| Code::Flags flags);
|
| @@ -272,6 +272,7 @@
|
| List<int>* code_positions,
|
| List<int>* source_positions);
|
|
|
| + Handle<Context> global_context_;
|
| Handle<JSObject> map_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(TypeFeedbackOracle);
|
|
|