Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(836)

Side by Side Diff: src/code-stub-assembler.cc

Issue 2799663003: [regexp] Add additional asserts to RegExp builtins (Closed)
Patch Set: Rebase Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/code-stub-assembler.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "src/code-stub-assembler.h" 4 #include "src/code-stub-assembler.h"
5 #include "src/code-factory.h" 5 #include "src/code-factory.h"
6 #include "src/frames-inl.h" 6 #include "src/frames-inl.h"
7 #include "src/frames.h" 7 #include "src/frames.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 3087 matching lines...) Expand 10 before | Expand all | Expand 10 after
3098 3098
3099 Node* CodeStubAssembler::IsFixedTypedArray(Node* object) { 3099 Node* CodeStubAssembler::IsFixedTypedArray(Node* object) {
3100 Node* instance_type = LoadInstanceType(object); 3100 Node* instance_type = LoadInstanceType(object);
3101 return Word32And( 3101 return Word32And(
3102 Int32GreaterThanOrEqual(instance_type, 3102 Int32GreaterThanOrEqual(instance_type,
3103 Int32Constant(FIRST_FIXED_TYPED_ARRAY_TYPE)), 3103 Int32Constant(FIRST_FIXED_TYPED_ARRAY_TYPE)),
3104 Int32LessThanOrEqual(instance_type, 3104 Int32LessThanOrEqual(instance_type,
3105 Int32Constant(LAST_FIXED_TYPED_ARRAY_TYPE))); 3105 Int32Constant(LAST_FIXED_TYPED_ARRAY_TYPE)));
3106 } 3106 }
3107 3107
3108 Node* CodeStubAssembler::IsJSRegExp(Node* object) {
3109 return HasInstanceType(object, JS_REGEXP_TYPE);
3110 }
3111
3108 Node* CodeStubAssembler::StringCharCodeAt(Node* string, Node* index, 3112 Node* CodeStubAssembler::StringCharCodeAt(Node* string, Node* index,
3109 ParameterMode parameter_mode) { 3113 ParameterMode parameter_mode) {
3110 CSA_ASSERT(this, IsString(string)); 3114 CSA_ASSERT(this, IsString(string));
3111 3115
3112 // Translate the {index} into a Word. 3116 // Translate the {index} into a Word.
3113 Node* const int_index = ParameterToWord(index, parameter_mode); 3117 Node* const int_index = ParameterToWord(index, parameter_mode);
3114 3118
3115 Variable var_result(this, MachineRepresentation::kWord32); 3119 Variable var_result(this, MachineRepresentation::kWord32);
3116 3120
3117 Label out(this, &var_result), runtime_generic(this), runtime_external(this); 3121 Label out(this, &var_result), runtime_generic(this), runtime_external(this);
(...skipping 5349 matching lines...) Expand 10 before | Expand all | Expand 10 after
8467 formatted.c_str(), TENURED); 8471 formatted.c_str(), TENURED);
8468 CallRuntime(Runtime::kGlobalPrint, NoContextConstant(), 8472 CallRuntime(Runtime::kGlobalPrint, NoContextConstant(),
8469 HeapConstant(string)); 8473 HeapConstant(string));
8470 } 8474 }
8471 CallRuntime(Runtime::kDebugPrint, NoContextConstant(), tagged_value); 8475 CallRuntime(Runtime::kDebugPrint, NoContextConstant(), tagged_value);
8472 #endif 8476 #endif
8473 } 8477 }
8474 8478
8475 } // namespace internal 8479 } // namespace internal
8476 } // namespace v8 8480 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stub-assembler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698