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

Side by Side Diff: src/stub-cache.cc

Issue 6580038: [Isolates] Merge from bleeding_edge, revisions 5934-6100. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 9 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « src/stub-cache.h ('k') | src/type-info.cc » ('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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1502 matching lines...) Expand 10 before | Expand all | Expand 10 after
1513 InLoopFlag in_loop, 1513 InLoopFlag in_loop,
1514 Code::Kind kind, 1514 Code::Kind kind,
1515 InlineCacheHolderFlag cache_holder) 1515 InlineCacheHolderFlag cache_holder)
1516 : arguments_(argc) 1516 : arguments_(argc)
1517 , in_loop_(in_loop) 1517 , in_loop_(in_loop)
1518 , kind_(kind) 1518 , kind_(kind)
1519 , cache_holder_(cache_holder) { 1519 , cache_holder_(cache_holder) {
1520 } 1520 }
1521 1521
1522 1522
1523 MaybeObject* CallStubCompiler::CompileCustomCall(int generator_id, 1523 bool CallStubCompiler::HasCustomCallGenerator(BuiltinFunctionId id) {
1524 #define CALL_GENERATOR_CASE(name) if (id == k##name) return true;
1525 CUSTOM_CALL_IC_GENERATORS(CALL_GENERATOR_CASE)
1526 #undef CALL_GENERATOR_CASE
1527 return false;
1528 }
1529
1530
1531 MaybeObject* CallStubCompiler::CompileCustomCall(BuiltinFunctionId id,
1524 Object* object, 1532 Object* object,
1525 JSObject* holder, 1533 JSObject* holder,
1526 JSGlobalPropertyCell* cell, 1534 JSGlobalPropertyCell* cell,
1527 JSFunction* function, 1535 JSFunction* function,
1528 String* fname) { 1536 String* fname) {
1529 ASSERT(generator_id >= 0 && generator_id < kNumCallGenerators); 1537 #define CALL_GENERATOR_CASE(name) \
1530 switch (generator_id) { 1538 if (id == k##name) { \
1531 #define CALL_GENERATOR_CASE(ignored1, ignored2, name) \ 1539 return CallStubCompiler::Compile##name##Call(object, \
1532 case k##name##CallGenerator: \ 1540 holder, \
1533 return CallStubCompiler::Compile##name##Call(object, \ 1541 cell, \
1534 holder, \ 1542 function, \
1535 cell, \ 1543 fname); \
1536 function, \ 1544 }
1537 fname); 1545 CUSTOM_CALL_IC_GENERATORS(CALL_GENERATOR_CASE)
1538 CUSTOM_CALL_IC_GENERATORS(CALL_GENERATOR_CASE)
1539 #undef CALL_GENERATOR_CASE 1546 #undef CALL_GENERATOR_CASE
1540 } 1547 ASSERT(!HasCustomCallGenerator(id));
1541 UNREACHABLE();
1542 return HEAP->undefined_value(); 1548 return HEAP->undefined_value();
1543 } 1549 }
1544 1550
1545 1551
1546 MaybeObject* CallStubCompiler::GetCode(PropertyType type, String* name) { 1552 MaybeObject* CallStubCompiler::GetCode(PropertyType type, String* name) {
1547 int argc = arguments_.immediate(); 1553 int argc = arguments_.immediate();
1548 Code::Flags flags = Code::ComputeMonomorphicFlags(kind_, 1554 Code::Flags flags = Code::ComputeMonomorphicFlags(kind_,
1549 type, 1555 type,
1550 cache_holder_, 1556 cache_holder_,
1551 in_loop_, 1557 in_loop_,
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
1637 expected_receiver_type_ = 1643 expected_receiver_type_ =
1638 FunctionTemplateInfo::cast(signature->receiver()); 1644 FunctionTemplateInfo::cast(signature->receiver());
1639 } 1645 }
1640 } 1646 }
1641 1647
1642 is_simple_api_call_ = true; 1648 is_simple_api_call_ = true;
1643 } 1649 }
1644 1650
1645 1651
1646 } } // namespace v8::internal 1652 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/stub-cache.h ('k') | src/type-info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698