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 #include "v8.h" | 5 #include "v8.h" |
6 | 6 |
7 #include "code-stubs.h" | 7 #include "code-stubs.h" |
8 #include "hydrogen.h" | 8 #include "hydrogen.h" |
9 #include "lithium.h" | 9 #include "lithium.h" |
10 | 10 |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 if_number.OrIf<HCompareMap>(value, isolate()->factory()->heap_number_map()); | 291 if_number.OrIf<HCompareMap>(value, isolate()->factory()->heap_number_map()); |
292 if_number.Then(); | 292 if_number.Then(); |
293 | 293 |
294 // Return the number. | 294 // Return the number. |
295 Push(value); | 295 Push(value); |
296 | 296 |
297 if_number.Else(); | 297 if_number.Else(); |
298 | 298 |
299 // Convert the parameter to number using the builtin. | 299 // Convert the parameter to number using the builtin. |
300 HValue* function = AddLoadJSBuiltin(Builtins::TO_NUMBER); | 300 HValue* function = AddLoadJSBuiltin(Builtins::TO_NUMBER); |
301 Add<HPushArguments>(zone(), value); | 301 Add<HPushArguments>(value); |
302 Push(Add<HInvokeFunction>(function, 1)); | 302 Push(Add<HInvokeFunction>(function, 1)); |
303 | 303 |
304 if_number.End(); | 304 if_number.End(); |
305 | 305 |
306 return Pop(); | 306 return Pop(); |
307 } | 307 } |
308 | 308 |
309 | 309 |
310 Handle<Code> ToNumberStub::GenerateCode() { | 310 Handle<Code> ToNumberStub::GenerateCode() { |
311 return DoGenerateCode(this); | 311 return DoGenerateCode(this); |
(...skipping 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1493 return BuildRegExpConstructResult(length, index, input); | 1493 return BuildRegExpConstructResult(length, index, input); |
1494 } | 1494 } |
1495 | 1495 |
1496 | 1496 |
1497 Handle<Code> RegExpConstructResultStub::GenerateCode() { | 1497 Handle<Code> RegExpConstructResultStub::GenerateCode() { |
1498 return DoGenerateCode(this); | 1498 return DoGenerateCode(this); |
1499 } | 1499 } |
1500 | 1500 |
1501 | 1501 |
1502 } } // namespace v8::internal | 1502 } } // namespace v8::internal |
OLD | NEW |