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

Side by Side Diff: src/types.h

Issue 1182193005: [turbofan] Remove the TryLowerDirectJSCall hack from generic lowering. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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/compiler/typer.cc ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #ifndef V8_TYPES_H_ 5 #ifndef V8_TYPES_H_
6 #define V8_TYPES_H_ 6 #define V8_TYPES_H_
7 7
8 #include "src/conversions.h" 8 #include "src/conversions.h"
9 #include "src/factory.h" 9 #include "src/factory.h"
10 #include "src/handles.h" 10 #include "src/handles.h"
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 V(UniqueName, kSymbol | kInternalizedString) \ 226 V(UniqueName, kSymbol | kInternalizedString) \
227 V(Name, kSymbol | kString) \ 227 V(Name, kSymbol | kString) \
228 V(NumberOrString, kNumber | kString) \ 228 V(NumberOrString, kNumber | kString) \
229 V(PlainPrimitive, kNumberOrString | kBoolean | kNull | kUndefined) \ 229 V(PlainPrimitive, kNumberOrString | kBoolean | kNull | kUndefined) \
230 V(Primitive, kSymbol | kPlainPrimitive) \ 230 V(Primitive, kSymbol | kPlainPrimitive) \
231 V(DetectableObject, kGlobalObject | kOtherObject) \ 231 V(DetectableObject, kGlobalObject | kOtherObject) \
232 V(DetectableReceiver, kDetectableObject | kProxy) \ 232 V(DetectableReceiver, kDetectableObject | kProxy) \
233 V(Detectable, kDetectableReceiver | kNumber | kName) \ 233 V(Detectable, kDetectableReceiver | kNumber | kName) \
234 V(Object, kDetectableObject | kUndetectable) \ 234 V(Object, kDetectableObject | kUndetectable) \
235 V(Receiver, kObject | kProxy) \ 235 V(Receiver, kObject | kProxy) \
236 V(ReceiverOrUndefined, kReceiver | kUndefined) \
236 V(StringOrReceiver, kString | kReceiver) \ 237 V(StringOrReceiver, kString | kReceiver) \
237 V(Unique, kBoolean | kUniqueName | kNull | kUndefined | \ 238 V(Unique, kBoolean | kUniqueName | kNull | kUndefined | \
238 kReceiver) \ 239 kReceiver) \
239 V(NonNumber, kUnique | kString | kInternal) \ 240 V(NonNumber, kUnique | kString | kInternal) \
240 V(Any, 0xfffffffeu) 241 V(Any, 0xfffffffeu)
241 242
242 // clang-format on 243 // clang-format on
243 244
244 /* 245 /*
245 * The following diagrams show how integers (in the mathematical sense) are 246 * The following diagrams show how integers (in the mathematical sense) are
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 } 404 }
404 static TypeHandle Function( 405 static TypeHandle Function(
405 TypeHandle result, TypeHandle param0, TypeHandle param1, 406 TypeHandle result, TypeHandle param0, TypeHandle param1,
406 TypeHandle param2, Region* region) { 407 TypeHandle param2, Region* region) {
407 FunctionHandle function = Function(result, Any(region), 3, region); 408 FunctionHandle function = Function(result, Any(region), 3, region);
408 function->InitParameter(0, param0); 409 function->InitParameter(0, param0);
409 function->InitParameter(1, param1); 410 function->InitParameter(1, param1);
410 function->InitParameter(2, param2); 411 function->InitParameter(2, param2);
411 return function; 412 return function;
412 } 413 }
414 static TypeHandle Function(TypeHandle result, int arity, TypeHandle* params,
415 Region* region) {
416 FunctionHandle function = Function(result, Any(region), arity, region);
417 for (int i = 0; i < arity; ++i) {
418 function->InitParameter(i, params[i]);
419 }
420 return function;
421 }
413 422
414 static TypeHandle Union(TypeHandle type1, TypeHandle type2, Region* reg); 423 static TypeHandle Union(TypeHandle type1, TypeHandle type2, Region* reg);
415 static TypeHandle Intersect(TypeHandle type1, TypeHandle type2, Region* reg); 424 static TypeHandle Intersect(TypeHandle type1, TypeHandle type2, Region* reg);
416 static TypeImpl* Union(TypeImpl* type1, TypeImpl* type2) { 425 static TypeImpl* Union(TypeImpl* type1, TypeImpl* type2) {
417 return BitsetType::New(type1->AsBitset() | type2->AsBitset()); 426 return BitsetType::New(type1->AsBitset() | type2->AsBitset());
418 } 427 }
419 static TypeImpl* Intersect(TypeImpl* type1, TypeImpl* type2) { 428 static TypeImpl* Intersect(TypeImpl* type1, TypeImpl* type2) {
420 return BitsetType::New(type1->AsBitset() & type2->AsBitset()); 429 return BitsetType::New(type1->AsBitset() & type2->AsBitset());
421 } 430 }
422 431
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
1151 bool Narrows(BoundsImpl that) { 1160 bool Narrows(BoundsImpl that) {
1152 return that.lower->Is(this->lower) && this->upper->Is(that.upper); 1161 return that.lower->Is(this->lower) && this->upper->Is(that.upper);
1153 } 1162 }
1154 }; 1163 };
1155 1164
1156 typedef BoundsImpl<ZoneTypeConfig> Bounds; 1165 typedef BoundsImpl<ZoneTypeConfig> Bounds;
1157 1166
1158 } } // namespace v8::internal 1167 } } // namespace v8::internal
1159 1168
1160 #endif // V8_TYPES_H_ 1169 #endif // V8_TYPES_H_
OLDNEW
« no previous file with comments | « src/compiler/typer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698