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

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

Issue 1148007: Merge bleeding_edge from version 2.1.3 up to revision 4205... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/partial_snapshots/
Patch Set: Created 10 years, 9 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
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 Handle<Code> ComputeCallMiss(int argc); 319 Handle<Code> ComputeCallMiss(int argc);
320 320
321 321
322 // The stub compiler compiles stubs for the stub cache. 322 // The stub compiler compiles stubs for the stub cache.
323 class StubCompiler BASE_EMBEDDED { 323 class StubCompiler BASE_EMBEDDED {
324 public: 324 public:
325 enum CheckType { 325 enum CheckType {
326 RECEIVER_MAP_CHECK, 326 RECEIVER_MAP_CHECK,
327 STRING_CHECK, 327 STRING_CHECK,
328 NUMBER_CHECK, 328 NUMBER_CHECK,
329 BOOLEAN_CHECK, 329 BOOLEAN_CHECK
330 JSARRAY_HAS_FAST_ELEMENTS_CHECK
331 }; 330 };
332 331
333 StubCompiler() : scope_(), masm_(NULL, 256), failure_(NULL) { } 332 StubCompiler() : scope_(), masm_(NULL, 256), failure_(NULL) { }
334 333
335 Object* CompileCallInitialize(Code::Flags flags); 334 Object* CompileCallInitialize(Code::Flags flags);
336 Object* CompileCallPreMonomorphic(Code::Flags flags); 335 Object* CompileCallPreMonomorphic(Code::Flags flags);
337 Object* CompileCallNormal(Code::Flags flags); 336 Object* CompileCallNormal(Code::Flags flags);
338 Object* CompileCallMegamorphic(Code::Flags flags); 337 Object* CompileCallMegamorphic(Code::Flags flags);
339 Object* CompileCallMiss(Code::Flags flags); 338 Object* CompileCallMiss(Code::Flags flags);
340 #ifdef ENABLE_DEBUGGER_SUPPORT 339 #ifdef ENABLE_DEBUGGER_SUPPORT
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 Map* transition, 541 Map* transition,
543 String* name); 542 String* name);
544 543
545 private: 544 private:
546 Object* GetCode(PropertyType type, String* name); 545 Object* GetCode(PropertyType type, String* name);
547 }; 546 };
548 547
549 548
550 class CallStubCompiler: public StubCompiler { 549 class CallStubCompiler: public StubCompiler {
551 public: 550 public:
552 explicit CallStubCompiler(int argc, InLoopFlag in_loop) 551 CallStubCompiler(int argc, InLoopFlag in_loop)
553 : arguments_(argc), in_loop_(in_loop) { } 552 : arguments_(argc), in_loop_(in_loop) { }
554 553
555 Object* CompileCallField(JSObject* object, 554 Object* CompileCallField(JSObject* object,
556 JSObject* holder, 555 JSObject* holder,
557 int index, 556 int index,
558 String* name); 557 String* name);
559 Object* CompileCallConstant(Object* object, 558 Object* CompileCallConstant(Object* object,
560 JSObject* holder, 559 JSObject* holder,
561 JSFunction* function, 560 JSFunction* function,
562 String* name, 561 String* name,
563 CheckType check); 562 CheckType check);
564 Object* CompileCallInterceptor(JSObject* object, 563 Object* CompileCallInterceptor(JSObject* object,
565 JSObject* holder, 564 JSObject* holder,
566 String* name); 565 String* name);
567 Object* CompileCallGlobal(JSObject* object, 566 Object* CompileCallGlobal(JSObject* object,
568 GlobalObject* holder, 567 GlobalObject* holder,
569 JSGlobalPropertyCell* cell, 568 JSGlobalPropertyCell* cell,
570 JSFunction* function, 569 JSFunction* function,
571 String* name); 570 String* name);
572 571
572 Object* CompileArrayPushCall(Object* object,
573 JSObject* holder,
574 JSFunction* function,
575 String* name,
576 CheckType check);
577
578 Object* CompileArrayPopCall(Object* object,
579 JSObject* holder,
580 JSFunction* function,
581 String* name,
582 CheckType check);
583
573 private: 584 private:
574 const ParameterCount arguments_; 585 const ParameterCount arguments_;
575 const InLoopFlag in_loop_; 586 const InLoopFlag in_loop_;
576 587
577 const ParameterCount& arguments() { return arguments_; } 588 const ParameterCount& arguments() { return arguments_; }
578 589
579 Object* GetCode(PropertyType type, String* name); 590 Object* GetCode(PropertyType type, String* name);
580 }; 591 };
581 592
582 593
583 class ConstructStubCompiler: public StubCompiler { 594 class ConstructStubCompiler: public StubCompiler {
584 public: 595 public:
585 explicit ConstructStubCompiler() {} 596 explicit ConstructStubCompiler() {}
586 597
587 Object* CompileConstructStub(SharedFunctionInfo* shared); 598 Object* CompileConstructStub(SharedFunctionInfo* shared);
588 599
589 private: 600 private:
590 Object* GetCode(); 601 Object* GetCode();
591 }; 602 };
592 603
593 604
605 typedef Object* (*CustomCallGenerator)(CallStubCompiler* compiler,
606 Object* object,
607 JSObject* holder,
608 JSFunction* function,
609 String* name,
610 StubCompiler::CheckType check);
611
612
594 } } // namespace v8::internal 613 } } // namespace v8::internal
595 614
596 #endif // V8_STUB_CACHE_H_ 615 #endif // V8_STUB_CACHE_H_
OLDNEW
« src/runtime.cc ('K') | « src/string.js ('k') | src/stub-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698