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

Side by Side Diff: src/compiler/typer.cc

Issue 2916063002: [turbofan] Optimize Function.prototype.bind for the common case. (Closed)
Patch Set: Address feedback. Created 3 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/js-builtin-reducer.cc ('k') | src/objects.h » ('j') | 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 #include "src/compiler/typer.h" 5 #include "src/compiler/typer.h"
6 6
7 #include <iomanip> 7 #include <iomanip>
8 8
9 #include "src/base/flags.h" 9 #include "src/base/flags.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 1495 matching lines...) Expand 10 before | Expand all | Expand 10 after
1506 case kRegExpCompile: 1506 case kRegExpCompile:
1507 return Type::OtherObject(); 1507 return Type::OtherObject();
1508 case kRegExpExec: 1508 case kRegExpExec:
1509 return Type::Union(Type::Array(), Type::Null(), t->zone()); 1509 return Type::Union(Type::Array(), Type::Null(), t->zone());
1510 case kRegExpTest: 1510 case kRegExpTest:
1511 return Type::Boolean(); 1511 return Type::Boolean();
1512 case kRegExpToString: 1512 case kRegExpToString:
1513 return Type::String(); 1513 return Type::String();
1514 1514
1515 // Function functions. 1515 // Function functions.
1516 case kFunctionBind:
1517 return Type::BoundFunction();
1516 case kFunctionHasInstance: 1518 case kFunctionHasInstance:
1517 return Type::Boolean(); 1519 return Type::Boolean();
1518 1520
1519 // Global functions. 1521 // Global functions.
1520 case kGlobalDecodeURI: 1522 case kGlobalDecodeURI:
1521 case kGlobalDecodeURIComponent: 1523 case kGlobalDecodeURIComponent:
1522 case kGlobalEncodeURI: 1524 case kGlobalEncodeURI:
1523 case kGlobalEncodeURIComponent: 1525 case kGlobalEncodeURIComponent:
1524 case kGlobalEscape: 1526 case kGlobalEscape:
1525 case kGlobalUnescape: 1527 case kGlobalUnescape:
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
1980 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { 1982 Type* Typer::Visitor::TypeConstant(Handle<Object> value) {
1981 if (Type::IsInteger(*value)) { 1983 if (Type::IsInteger(*value)) {
1982 return Type::Range(value->Number(), value->Number(), zone()); 1984 return Type::Range(value->Number(), value->Number(), zone());
1983 } 1985 }
1984 return Type::NewConstant(value, zone()); 1986 return Type::NewConstant(value, zone());
1985 } 1987 }
1986 1988
1987 } // namespace compiler 1989 } // namespace compiler
1988 } // namespace internal 1990 } // namespace internal
1989 } // namespace v8 1991 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-builtin-reducer.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698