OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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 "src/builtins/builtins.h" | 5 #include "src/builtins/builtins.h" |
6 #include "src/builtins/builtins-utils.h" | 6 #include "src/builtins/builtins-utils.h" |
7 | 7 |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 GenerateStringEqual(assembler, kDontNegateResult); | 387 GenerateStringEqual(assembler, kDontNegateResult); |
388 } | 388 } |
389 | 389 |
390 // static | 390 // static |
391 void Builtins::Generate_StringNotEqual(CodeStubAssembler* assembler) { | 391 void Builtins::Generate_StringNotEqual(CodeStubAssembler* assembler) { |
392 GenerateStringEqual(assembler, kNegateResult); | 392 GenerateStringEqual(assembler, kNegateResult); |
393 } | 393 } |
394 | 394 |
395 // static | 395 // static |
396 void Builtins::Generate_StringLessThan(CodeStubAssembler* assembler) { | 396 void Builtins::Generate_StringLessThan(CodeStubAssembler* assembler) { |
397 GenerateStringRelationalComparison(assembler, kLessThan); | 397 GenerateStringRelationalComparison(assembler, |
| 398 RelationalComparisonMode::kLessThan); |
398 } | 399 } |
399 | 400 |
400 // static | 401 // static |
401 void Builtins::Generate_StringLessThanOrEqual(CodeStubAssembler* assembler) { | 402 void Builtins::Generate_StringLessThanOrEqual(CodeStubAssembler* assembler) { |
402 GenerateStringRelationalComparison(assembler, kLessThanOrEqual); | 403 GenerateStringRelationalComparison( |
| 404 assembler, RelationalComparisonMode::kLessThanOrEqual); |
403 } | 405 } |
404 | 406 |
405 // static | 407 // static |
406 void Builtins::Generate_StringGreaterThan(CodeStubAssembler* assembler) { | 408 void Builtins::Generate_StringGreaterThan(CodeStubAssembler* assembler) { |
407 GenerateStringRelationalComparison(assembler, kGreaterThan); | 409 GenerateStringRelationalComparison(assembler, |
| 410 RelationalComparisonMode::kGreaterThan); |
408 } | 411 } |
409 | 412 |
410 // static | 413 // static |
411 void Builtins::Generate_StringGreaterThanOrEqual(CodeStubAssembler* assembler) { | 414 void Builtins::Generate_StringGreaterThanOrEqual(CodeStubAssembler* assembler) { |
412 GenerateStringRelationalComparison(assembler, kGreaterThanOrEqual); | 415 GenerateStringRelationalComparison( |
| 416 assembler, RelationalComparisonMode::kGreaterThanOrEqual); |
413 } | 417 } |
414 | 418 |
415 // ----------------------------------------------------------------------------- | 419 // ----------------------------------------------------------------------------- |
416 // ES6 section 21.1 String Objects | 420 // ES6 section 21.1 String Objects |
417 | 421 |
418 // ES6 section 21.1.2.1 String.fromCharCode ( ...codeUnits ) | 422 // ES6 section 21.1.2.1 String.fromCharCode ( ...codeUnits ) |
419 void Builtins::Generate_StringFromCharCode(CodeStubAssembler* assembler) { | 423 void Builtins::Generate_StringFromCharCode(CodeStubAssembler* assembler) { |
420 typedef CodeStubAssembler::Label Label; | 424 typedef CodeStubAssembler::Label Label; |
421 typedef compiler::Node Node; | 425 typedef compiler::Node Node; |
422 typedef CodeStubAssembler::Variable Variable; | 426 typedef CodeStubAssembler::Variable Variable; |
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1077 } | 1081 } |
1078 | 1082 |
1079 iterator->set_string(isolate->heap()->empty_string()); | 1083 iterator->set_string(isolate->heap()->empty_string()); |
1080 | 1084 |
1081 return *isolate->factory()->NewJSIteratorResult( | 1085 return *isolate->factory()->NewJSIteratorResult( |
1082 isolate->factory()->undefined_value(), true); | 1086 isolate->factory()->undefined_value(), true); |
1083 } | 1087 } |
1084 | 1088 |
1085 } // namespace internal | 1089 } // namespace internal |
1086 } // namespace v8 | 1090 } // namespace v8 |
OLD | NEW |