| Index: src/arm/code-stubs-arm.h
|
| ===================================================================
|
| --- src/arm/code-stubs-arm.h (revision 7180)
|
| +++ src/arm/code-stubs-arm.h (working copy)
|
| @@ -38,13 +38,22 @@
|
| // TranscendentalCache runtime function.
|
| class TranscendentalCacheStub: public CodeStub {
|
| public:
|
| - explicit TranscendentalCacheStub(TranscendentalCache::Type type)
|
| - : type_(type) {}
|
| + enum ArgumentType {
|
| + TAGGED = 0 << TranscendentalCache::kTranscendentalTypeBits,
|
| + UNTAGGED = 1 << TranscendentalCache::kTranscendentalTypeBits
|
| + };
|
| +
|
| + TranscendentalCacheStub(TranscendentalCache::Type type,
|
| + ArgumentType argument_type)
|
| + : type_(type), argument_type_(argument_type) { }
|
| void Generate(MacroAssembler* masm);
|
| private:
|
| TranscendentalCache::Type type_;
|
| + ArgumentType argument_type_;
|
| + void GenerateCallCFunction(MacroAssembler* masm, Register scratch);
|
| +
|
| Major MajorKey() { return TranscendentalCache; }
|
| - int MinorKey() { return type_; }
|
| + int MinorKey() { return type_ | argument_type_; }
|
| Runtime::FunctionId RuntimeFunction();
|
| };
|
|
|
| @@ -335,24 +344,36 @@
|
| // Flag that indicates how to generate code for the stub StringAddStub.
|
| enum StringAddFlags {
|
| NO_STRING_ADD_FLAGS = 0,
|
| - NO_STRING_CHECK_IN_STUB = 1 << 0 // Omit string check in stub.
|
| + // Omit left string check in stub (left is definitely a string).
|
| + NO_STRING_CHECK_LEFT_IN_STUB = 1 << 0,
|
| + // Omit right string check in stub (right is definitely a string).
|
| + NO_STRING_CHECK_RIGHT_IN_STUB = 1 << 1,
|
| + // Omit both string checks in stub.
|
| + NO_STRING_CHECK_IN_STUB =
|
| + NO_STRING_CHECK_LEFT_IN_STUB | NO_STRING_CHECK_RIGHT_IN_STUB
|
| };
|
|
|
|
|
| class StringAddStub: public CodeStub {
|
| public:
|
| - explicit StringAddStub(StringAddFlags flags) {
|
| - string_check_ = ((flags & NO_STRING_CHECK_IN_STUB) == 0);
|
| - }
|
| + explicit StringAddStub(StringAddFlags flags) : flags_(flags) {}
|
|
|
| private:
|
| Major MajorKey() { return StringAdd; }
|
| - int MinorKey() { return string_check_ ? 0 : 1; }
|
| + int MinorKey() { return flags_; }
|
|
|
| void Generate(MacroAssembler* masm);
|
|
|
| - // Should the stub check whether arguments are strings?
|
| - bool string_check_;
|
| + void GenerateConvertArgument(MacroAssembler* masm,
|
| + int stack_offset,
|
| + Register arg,
|
| + Register scratch1,
|
| + Register scratch2,
|
| + Register scratch3,
|
| + Register scratch4,
|
| + Label* slow);
|
| +
|
| + const StringAddFlags flags_;
|
| };
|
|
|
|
|
| @@ -567,6 +588,9 @@
|
| private:
|
| Major MajorKey() { return RegExpCEntry; }
|
| int MinorKey() { return 0; }
|
| +
|
| + bool NeedsImmovableCode() { return true; }
|
| +
|
| const char* GetName() { return "RegExpCEntryStub"; }
|
| };
|
|
|
| @@ -580,66 +604,19 @@
|
| public:
|
| DirectCEntryStub() {}
|
| void Generate(MacroAssembler* masm);
|
| - void GenerateCall(MacroAssembler* masm, ApiFunction *function);
|
| + void GenerateCall(MacroAssembler* masm, ExternalReference function);
|
| void GenerateCall(MacroAssembler* masm, Register target);
|
|
|
| private:
|
| Major MajorKey() { return DirectCEntry; }
|
| int MinorKey() { return 0; }
|
| +
|
| + bool NeedsImmovableCode() { return true; }
|
| +
|
| const char* GetName() { return "DirectCEntryStub"; }
|
| };
|
|
|
|
|
| -// Generate code to load an element from a pixel array. The receiver is assumed
|
| -// to not be a smi and to have elements, the caller must guarantee this
|
| -// precondition. If key is not a smi, then the generated code branches to
|
| -// key_not_smi. Callers can specify NULL for key_not_smi to signal that a smi
|
| -// check has already been performed on key so that the smi check is not
|
| -// generated. If key is not a valid index within the bounds of the pixel array,
|
| -// the generated code jumps to out_of_range. receiver, key and elements are
|
| -// unchanged throughout the generated code sequence.
|
| -void GenerateFastPixelArrayLoad(MacroAssembler* masm,
|
| - Register receiver,
|
| - Register key,
|
| - Register elements_map,
|
| - Register elements,
|
| - Register scratch1,
|
| - Register scratch2,
|
| - Register result,
|
| - Label* not_pixel_array,
|
| - Label* key_not_smi,
|
| - Label* out_of_range);
|
| -
|
| -// Generate code to store an element into a pixel array, clamping values between
|
| -// [0..255]. The receiver is assumed to not be a smi and to have elements, the
|
| -// caller must guarantee this precondition. If key is not a smi, then the
|
| -// generated code branches to key_not_smi. Callers can specify NULL for
|
| -// key_not_smi to signal that a smi check has already been performed on key so
|
| -// that the smi check is not generated. If value is not a smi, the generated
|
| -// code will branch to value_not_smi. If the receiver doesn't have pixel array
|
| -// elements, the generated code will branch to not_pixel_array, unless
|
| -// not_pixel_array is NULL, in which case the caller must ensure that the
|
| -// receiver has pixel array elements. If key is not a valid index within the
|
| -// bounds of the pixel array, the generated code jumps to out_of_range. If
|
| -// load_elements_from_receiver is true, then the elements of receiver is loaded
|
| -// into elements, otherwise elements is assumed to already be the receiver's
|
| -// elements. If load_elements_map_from_elements is true, elements_map is loaded
|
| -// from elements, otherwise it is assumed to already contain the element map.
|
| -void GenerateFastPixelArrayStore(MacroAssembler* masm,
|
| - Register receiver,
|
| - Register key,
|
| - Register value,
|
| - Register elements,
|
| - Register elements_map,
|
| - Register scratch1,
|
| - Register scratch2,
|
| - bool load_elements_from_receiver,
|
| - bool load_elements_map_from_elements,
|
| - Label* key_not_smi,
|
| - Label* value_not_smi,
|
| - Label* not_pixel_array,
|
| - Label* out_of_range);
|
| -
|
| } } // namespace v8::internal
|
|
|
| #endif // V8_ARM_CODE_STUBS_ARM_H_
|
|
|