| Index: src/ia32/codegen-ia32.h
|
| ===================================================================
|
| --- src/ia32/codegen-ia32.h (revision 3862)
|
| +++ src/ia32/codegen-ia32.h (working copy)
|
| @@ -580,6 +580,9 @@
|
| // Support for direct calls from JavaScript to native RegExp code.
|
| void GenerateRegExpExec(ZoneList<Expression*>* args);
|
|
|
| + // Fast support for number to string.
|
| + void GenerateNumberToString(ZoneList<Expression*>* args);
|
| +
|
| // Simple condition analysis.
|
| enum ConditionAnalysis {
|
| ALWAYS_TRUE,
|
| @@ -860,6 +863,39 @@
|
| };
|
|
|
|
|
| +class NumberToStringStub: public CodeStub {
|
| + public:
|
| + NumberToStringStub() { }
|
| +
|
| + // Generate code to do a lookup in the number string cache. If the number in
|
| + // the register object is found in the cache the generated code falls through
|
| + // with the result in the result register. The object and the result register
|
| + // can be the same. If the number is not found in the cache the code jumps to
|
| + // the label not_found with only the content of register object unchanged.
|
| + static void GenerateLookupNumberStringCache(MacroAssembler* masm,
|
| + Register object,
|
| + Register result,
|
| + Register scratch1,
|
| + Register scratch2,
|
| + bool object_is_smi,
|
| + Label* not_found);
|
| +
|
| + private:
|
| + Major MajorKey() { return NumberToString; }
|
| + int MinorKey() { return 0; }
|
| +
|
| + void Generate(MacroAssembler* masm);
|
| +
|
| + const char* GetName() { return "NumberToStringStub"; }
|
| +
|
| +#ifdef DEBUG
|
| + void Print() {
|
| + PrintF("NumberToStringStub\n");
|
| + }
|
| +#endif
|
| +};
|
| +
|
| +
|
| } } // namespace v8::internal
|
|
|
| #endif // V8_IA32_CODEGEN_IA32_H_
|
|
|