| OLD | NEW | 
|     1 // Copyright 2012 the V8 project authors. All rights reserved. |     1 // Copyright 2012 the V8 project authors. All rights reserved. | 
|     2 // Use of this source code is governed by a BSD-style license that can be |     2 // Use of this source code is governed by a BSD-style license that can be | 
|     3 // found in the LICENSE file. |     3 // found in the LICENSE file. | 
|     4  |     4  | 
|     5 #if V8_TARGET_ARCH_IA32 |     5 #if V8_TARGET_ARCH_IA32 | 
|     6  |     6  | 
|     7 #include "src/ast/scopes.h" |     7 #include "src/ast/scopes.h" | 
|     8 #include "src/code-factory.h" |     8 #include "src/code-factory.h" | 
|     9 #include "src/code-stubs.h" |     9 #include "src/code-stubs.h" | 
|    10 #include "src/codegen.h" |    10 #include "src/codegen.h" | 
| (...skipping 2985 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  2996   } |  2996   } | 
|  2997  |  2997  | 
|  2998   __ SmiUntag(value); |  2998   __ SmiUntag(value); | 
|  2999   // No need to untag a smi for two-byte addressing. |  2999   // No need to untag a smi for two-byte addressing. | 
|  3000   __ mov_w(FieldOperand(string, index, times_1, SeqTwoByteString::kHeaderSize), |  3000   __ mov_w(FieldOperand(string, index, times_1, SeqTwoByteString::kHeaderSize), | 
|  3001            value); |  3001            value); | 
|  3002   context()->Plug(string); |  3002   context()->Plug(string); | 
|  3003 } |  3003 } | 
|  3004  |  3004  | 
|  3005  |  3005  | 
|  3006 void FullCodeGenerator::EmitToInteger(CallRuntime* expr) { |  | 
|  3007   ZoneList<Expression*>* args = expr->arguments(); |  | 
|  3008   DCHECK_EQ(1, args->length()); |  | 
|  3009  |  | 
|  3010   // Load the argument into eax and convert it. |  | 
|  3011   VisitForAccumulatorValue(args->at(0)); |  | 
|  3012  |  | 
|  3013   // Convert the object to an integer. |  | 
|  3014   Label done_convert; |  | 
|  3015   __ JumpIfSmi(eax, &done_convert, Label::kNear); |  | 
|  3016   __ Push(eax); |  | 
|  3017   __ CallRuntime(Runtime::kToInteger); |  | 
|  3018   __ bind(&done_convert); |  | 
|  3019   context()->Plug(eax); |  | 
|  3020 } |  | 
|  3021  |  | 
|  3022  |  | 
|  3023 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { |  3006 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { | 
|  3024   ZoneList<Expression*>* args = expr->arguments(); |  3007   ZoneList<Expression*>* args = expr->arguments(); | 
|  3025   DCHECK(args->length() == 1); |  3008   DCHECK(args->length() == 1); | 
|  3026  |  3009  | 
|  3027   VisitForAccumulatorValue(args->at(0)); |  3010   VisitForAccumulatorValue(args->at(0)); | 
|  3028  |  3011  | 
|  3029   Label done; |  3012   Label done; | 
|  3030   StringCharFromCodeGenerator generator(eax, ebx); |  3013   StringCharFromCodeGenerator generator(eax, ebx); | 
|  3031   generator.GenerateFast(masm_); |  3014   generator.GenerateFast(masm_); | 
|  3032   __ jmp(&done); |  3015   __ jmp(&done); | 
| (...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  4002       isolate->builtins()->OnStackReplacement()->entry(), |  3985       isolate->builtins()->OnStackReplacement()->entry(), | 
|  4003       Assembler::target_address_at(call_target_address, unoptimized_code)); |  3986       Assembler::target_address_at(call_target_address, unoptimized_code)); | 
|  4004   return ON_STACK_REPLACEMENT; |  3987   return ON_STACK_REPLACEMENT; | 
|  4005 } |  3988 } | 
|  4006  |  3989  | 
|  4007  |  3990  | 
|  4008 }  // namespace internal |  3991 }  // namespace internal | 
|  4009 }  // namespace v8 |  3992 }  // namespace v8 | 
|  4010  |  3993  | 
|  4011 #endif  // V8_TARGET_ARCH_IA32 |  3994 #endif  // V8_TARGET_ARCH_IA32 | 
| OLD | NEW |