| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 virtual void Visit##type(type* node); | 313 virtual void Visit##type(type* node); |
| 314 NODE_LIST(DEF_VISIT) | 314 NODE_LIST(DEF_VISIT) |
| 315 #undef DEF_VISIT | 315 #undef DEF_VISIT |
| 316 | 316 |
| 317 void RecordStatementPosition(Node* node); | 317 void RecordStatementPosition(Node* node); |
| 318 | 318 |
| 319 // Activation frames. | 319 // Activation frames. |
| 320 void EnterJSFrame(); | 320 void EnterJSFrame(); |
| 321 void ExitJSFrame(); | 321 void ExitJSFrame(); |
| 322 | 322 |
| 323 virtual void GenerateShiftDownAndTailCall(ZoneList<Expression*>* args); | |
| 324 virtual void GenerateSetThisFunction(ZoneList<Expression*>* args); | |
| 325 virtual void GenerateGetThisFunction(ZoneList<Expression*>* args); | |
| 326 virtual void GenerateSetThis(ZoneList<Expression*>* args); | |
| 327 virtual void GenerateGetArgumentsLength(ZoneList<Expression*>* args); | |
| 328 virtual void GenerateSetArgumentsLength(ZoneList<Expression*>* args); | |
| 329 virtual void GenerateTailCallWithArguments(ZoneList<Expression*>* args); | |
| 330 virtual void GenerateSetArgument(ZoneList<Expression*>* args); | |
| 331 virtual void GenerateSquashFrame(ZoneList<Expression*>* args); | |
| 332 virtual void GenerateExpandFrame(ZoneList<Expression*>* args); | |
| 333 virtual void GenerateIsSmi(ZoneList<Expression*>* args); | 323 virtual void GenerateIsSmi(ZoneList<Expression*>* args); |
| 334 virtual void GenerateIsNonNegativeSmi(ZoneList<Expression*>* args); | 324 virtual void GenerateIsNonNegativeSmi(ZoneList<Expression*>* args); |
| 335 virtual void GenerateIsArray(ZoneList<Expression*>* args); | 325 virtual void GenerateIsArray(ZoneList<Expression*>* args); |
| 336 | 326 |
| 337 virtual void GenerateArgumentsLength(ZoneList<Expression*>* args); | 327 virtual void GenerateArgumentsLength(ZoneList<Expression*>* args); |
| 338 virtual void GenerateArgumentsAccess(ZoneList<Expression*>* args); | 328 virtual void GenerateArgumentsAccess(ZoneList<Expression*>* args); |
| 339 | 329 |
| 340 virtual void GenerateValueOf(ZoneList<Expression*>* args); | 330 virtual void GenerateValueOf(ZoneList<Expression*>* args); |
| 341 virtual void GenerateSetValueOf(ZoneList<Expression*>* args); | 331 virtual void GenerateSetValueOf(ZoneList<Expression*>* args); |
| 342 | 332 |
| (...skipping 3685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4028 | 4018 |
| 4029 // Call the construct call builtin that handles allocation and | 4019 // Call the construct call builtin that handles allocation and |
| 4030 // constructor invocation. | 4020 // constructor invocation. |
| 4031 __ RecordPosition(node->position()); | 4021 __ RecordPosition(node->position()); |
| 4032 __ call(Handle<Code>(Builtins::builtin(Builtins::JSConstructCall)), | 4022 __ call(Handle<Code>(Builtins::builtin(Builtins::JSConstructCall)), |
| 4033 js_construct_call); | 4023 js_construct_call); |
| 4034 __ mov(TOS, eax); // discard the function and "push" the newly created object | 4024 __ mov(TOS, eax); // discard the function and "push" the newly created object |
| 4035 } | 4025 } |
| 4036 | 4026 |
| 4037 | 4027 |
| 4038 void Ia32CodeGenerator::GenerateSetThisFunction(ZoneList<Expression*>* args) { | |
| 4039 // Not used on IA-32 anymore. Should go away soon. | |
| 4040 __ int3(); | |
| 4041 } | |
| 4042 | |
| 4043 | |
| 4044 void Ia32CodeGenerator::GenerateGetThisFunction(ZoneList<Expression*>* args) { | |
| 4045 // Not used on IA-32 anymore. Should go away soon. | |
| 4046 __ int3(); | |
| 4047 } | |
| 4048 | |
| 4049 | |
| 4050 void Ia32CodeGenerator::GenerateSetThis(ZoneList<Expression*>* args) { | |
| 4051 // Not used on IA-32 anymore. Should go away soon. | |
| 4052 __ int3(); | |
| 4053 } | |
| 4054 | |
| 4055 | |
| 4056 void Ia32CodeGenerator::GenerateSetArgumentsLength( | |
| 4057 ZoneList<Expression*>* args) { | |
| 4058 // Not used on IA-32 anymore. Should go away soon. | |
| 4059 __ int3(); | |
| 4060 } | |
| 4061 | |
| 4062 | |
| 4063 void Ia32CodeGenerator::GenerateGetArgumentsLength( | |
| 4064 ZoneList<Expression*>* args) { | |
| 4065 // Not used on IA-32 anymore. Should go away soon. | |
| 4066 __ int3(); | |
| 4067 } | |
| 4068 | |
| 4069 | |
| 4070 void Ia32CodeGenerator::GenerateTailCallWithArguments( | |
| 4071 ZoneList<Expression*>* args) { | |
| 4072 // Not used on IA-32 anymore. Should go away soon. | |
| 4073 __ int3(); | |
| 4074 } | |
| 4075 | |
| 4076 | |
| 4077 void Ia32CodeGenerator::GenerateSetArgument(ZoneList<Expression*>* args) { | |
| 4078 // Not used on IA-32 anymore. Should go away soon. | |
| 4079 __ int3(); | |
| 4080 } | |
| 4081 | |
| 4082 | |
| 4083 void Ia32CodeGenerator::GenerateSquashFrame(ZoneList<Expression*>* args) { | |
| 4084 // Not used on IA-32 anymore. Should go away soon. | |
| 4085 __ int3(); | |
| 4086 } | |
| 4087 | |
| 4088 | |
| 4089 void Ia32CodeGenerator::GenerateExpandFrame(ZoneList<Expression*>* args) { | |
| 4090 // Not used on IA-32 anymore. Should go away soon. | |
| 4091 __ int3(); | |
| 4092 } | |
| 4093 | |
| 4094 | |
| 4095 void Ia32CodeGenerator::GenerateShiftDownAndTailCall( | |
| 4096 ZoneList<Expression*>* args) { | |
| 4097 // Not used on IA-32 anymore. Should go away soon. | |
| 4098 __ int3(); | |
| 4099 } | |
| 4100 | |
| 4101 | |
| 4102 void Ia32CodeGenerator::GenerateIsSmi(ZoneList<Expression*>* args) { | 4028 void Ia32CodeGenerator::GenerateIsSmi(ZoneList<Expression*>* args) { |
| 4103 ASSERT(args->length() == 1); | 4029 ASSERT(args->length() == 1); |
| 4104 Load(args->at(0)); | 4030 Load(args->at(0)); |
| 4105 __ pop(eax); | 4031 __ pop(eax); |
| 4106 __ test(eax, Immediate(kSmiTagMask)); | 4032 __ test(eax, Immediate(kSmiTagMask)); |
| 4107 cc_reg_ = zero; | 4033 cc_reg_ = zero; |
| 4108 } | 4034 } |
| 4109 | 4035 |
| 4110 | 4036 |
| 4111 void Ia32CodeGenerator::GenerateIsNonNegativeSmi(ZoneList<Expression*>* args) { | 4037 void Ia32CodeGenerator::GenerateIsNonNegativeSmi(ZoneList<Expression*>* args) { |
| (...skipping 1357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5469 bool is_eval) { | 5395 bool is_eval) { |
| 5470 Handle<Code> code = Ia32CodeGenerator::MakeCode(fun, script, is_eval); | 5396 Handle<Code> code = Ia32CodeGenerator::MakeCode(fun, script, is_eval); |
| 5471 if (!code.is_null()) { | 5397 if (!code.is_null()) { |
| 5472 Counters::total_compiled_code_size.Increment(code->instruction_size()); | 5398 Counters::total_compiled_code_size.Increment(code->instruction_size()); |
| 5473 } | 5399 } |
| 5474 return code; | 5400 return code; |
| 5475 } | 5401 } |
| 5476 | 5402 |
| 5477 | 5403 |
| 5478 } } // namespace v8::internal | 5404 } } // namespace v8::internal |
| OLD | NEW |