v8  3.14.5(node0.10.28)
V8 is Google's open source JavaScript engine
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
code-stubs.h
Go to the documentation of this file.
1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are
4 // met:
5 //
6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided
11 // with the distribution.
12 // * Neither the name of Google Inc. nor the names of its
13 // contributors may be used to endorse or promote products derived
14 // from this software without specific prior written permission.
15 //
16 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 
28 #ifndef V8_CODE_STUBS_H_
29 #define V8_CODE_STUBS_H_
30 
31 #include "allocation.h"
32 #include "globals.h"
33 #include "codegen.h"
34 
35 namespace v8 {
36 namespace internal {
37 
38 // List of code stubs used on all platforms.
39 #define CODE_STUB_LIST_ALL_PLATFORMS(V) \
40  V(CallFunction) \
41  V(CallConstruct) \
42  V(UnaryOp) \
43  V(BinaryOp) \
44  V(StringAdd) \
45  V(SubString) \
46  V(StringCompare) \
47  V(Compare) \
48  V(CompareIC) \
49  V(MathPow) \
50  V(RecordWrite) \
51  V(StoreBufferOverflow) \
52  V(RegExpExec) \
53  V(TranscendentalCache) \
54  V(Instanceof) \
55  V(ConvertToDouble) \
56  V(WriteInt32ToHeapNumber) \
57  V(StackCheck) \
58  V(Interrupt) \
59  V(FastNewClosure) \
60  V(FastNewContext) \
61  V(FastNewBlockContext) \
62  V(FastCloneShallowArray) \
63  V(FastCloneShallowObject) \
64  V(ToBoolean) \
65  V(ToNumber) \
66  V(ArgumentsAccess) \
67  V(RegExpConstructResult) \
68  V(NumberToString) \
69  V(CEntry) \
70  V(JSEntry) \
71  V(KeyedLoadElement) \
72  V(KeyedStoreElement) \
73  V(DebuggerStatement) \
74  V(StringDictionaryLookup) \
75  V(ElementsTransitionAndStore) \
76  V(StoreArrayLiteralElement) \
77  V(ProfileEntryHook)
78 
79 // List of code stubs only used on ARM platforms.
80 #ifdef V8_TARGET_ARCH_ARM
81 #define CODE_STUB_LIST_ARM(V) \
82  V(GetProperty) \
83  V(SetProperty) \
84  V(InvokeBuiltin) \
85  V(RegExpCEntry) \
86  V(DirectCEntry)
87 #else
88 #define CODE_STUB_LIST_ARM(V)
89 #endif
90 
91 // List of code stubs only used on MIPS platforms.
92 #ifdef V8_TARGET_ARCH_MIPS
93 #define CODE_STUB_LIST_MIPS(V) \
94  V(RegExpCEntry) \
95  V(DirectCEntry)
96 #else
97 #define CODE_STUB_LIST_MIPS(V)
98 #endif
99 
100 // Combined list of code stubs.
101 #define CODE_STUB_LIST(V) \
102  CODE_STUB_LIST_ALL_PLATFORMS(V) \
103  CODE_STUB_LIST_ARM(V) \
104  CODE_STUB_LIST_MIPS(V)
105 
106 // Mode to overwrite BinaryExpression values.
109 
110 
111 // Stub is base classes of all stubs.
112 class CodeStub BASE_EMBEDDED {
113  public:
114  enum Major {
115 #define DEF_ENUM(name) name,
117 #undef DEF_ENUM
118  NoCache, // marker for stubs that do custom caching
119  NUMBER_OF_IDS
120  };
121 
122  // Retrieve the code for the stub. Generate the code if needed.
123  Handle<Code> GetCode();
124 
125  static Major MajorKeyFromKey(uint32_t key) {
126  return static_cast<Major>(MajorKeyBits::decode(key));
127  }
128  static int MinorKeyFromKey(uint32_t key) {
129  return MinorKeyBits::decode(key);
130  }
131 
132  // Gets the major key from a code object that is a code stub or binary op IC.
133  static Major GetMajorKey(Code* code_stub) {
134  return static_cast<Major>(code_stub->major_key());
135  }
136 
137  static const char* MajorName(Major major_key, bool allow_unknown_keys);
138 
139  virtual ~CodeStub() {}
140 
142  bool is_pregenerated = IsPregenerated();
143  Code* code = NULL;
144  CHECK(!is_pregenerated || FindCodeInCache(&code));
145  return is_pregenerated;
146  }
147 
148  // See comment above, where Instanceof is defined.
149  virtual bool IsPregenerated() { return false; }
150 
151  static void GenerateStubsAheadOfTime();
152  static void GenerateFPStubs();
153 
154  // Some stubs put untagged junk on the stack that cannot be scanned by the
155  // GC. This means that we must be statically sure that no GC can occur while
156  // they are running. If that is the case they should override this to return
157  // true, which will cause an assertion if we try to call something that can
158  // GC or if we try to put a stack frame on top of the junk, which would not
159  // result in a traversable stack.
160  virtual bool SometimesSetsUpAFrame() { return true; }
161 
162  // Lookup the code in the (possibly custom) cache.
163  bool FindCodeInCache(Code** code_out);
164 
165  protected:
166  static bool CanUseFPRegisters();
167 
168  private:
169  // Nonvirtual wrapper around the stub-specific Generate function. Call
170  // this function to set up the macro assembler and generate the code.
171  void GenerateCode(MacroAssembler* masm);
172 
173  // Generates the assembler code for the stub.
174  virtual void Generate(MacroAssembler* masm) = 0;
175 
176  // Perform bookkeeping required after code generation when stub code is
177  // initially generated.
178  void RecordCodeGeneration(Code* code, MacroAssembler* masm);
179 
180  // Finish the code object after it has been generated.
181  virtual void FinishCode(Handle<Code> code) { }
182 
183  // Activate newly generated stub. Is called after
184  // registering stub in the stub cache.
185  virtual void Activate(Code* code) { }
186 
187  // Returns information for computing the number key.
188  virtual Major MajorKey() = 0;
189  virtual int MinorKey() = 0;
190 
191  // BinaryOpStub needs to override this.
192  virtual int GetCodeKind();
193 
194  // BinaryOpStub needs to override this.
195  virtual InlineCacheState GetICState() {
196  return UNINITIALIZED;
197  }
198 
199  // Add the code to a specialized cache, specific to an individual
200  // stub type. Please note, this method must add the code object to a
201  // roots object, otherwise we will remove the code during GC.
202  virtual void AddToSpecialCache(Handle<Code> new_object) { }
203 
204  // Find code in a specialized cache, work is delegated to the specific stub.
205  virtual bool FindCodeInSpecialCache(Code** code_out) { return false; }
206 
207  // If a stub uses a special cache override this.
208  virtual bool UseSpecialCache() { return false; }
209 
210  // Returns a name for logging/debugging purposes.
211  SmartArrayPointer<const char> GetName();
212  virtual void PrintName(StringStream* stream);
213 
214  // Returns whether the code generated for this stub needs to be allocated as
215  // a fixed (non-moveable) code object.
216  virtual bool NeedsImmovableCode() { return false; }
217 
218  // Computes the key based on major and minor.
219  uint32_t GetKey() {
220  ASSERT(static_cast<int>(MajorKey()) < NUMBER_OF_IDS);
221  return MinorKeyBits::encode(MinorKey()) |
222  MajorKeyBits::encode(MajorKey());
223  }
224 
225  class MajorKeyBits: public BitField<uint32_t, 0, kStubMajorKeyBits> {};
226  class MinorKeyBits: public BitField<uint32_t,
227  kStubMajorKeyBits, kStubMinorKeyBits> {}; // NOLINT
228 
229  friend class BreakPointIterator;
230 };
231 
232 
233 // Helper interface to prepare to/restore after making runtime calls.
235  public:
236  virtual ~RuntimeCallHelper() {}
237 
238  virtual void BeforeCall(MacroAssembler* masm) const = 0;
239 
240  virtual void AfterCall(MacroAssembler* masm) const = 0;
241 
242  protected:
244 
245  private:
246  DISALLOW_COPY_AND_ASSIGN(RuntimeCallHelper);
247 };
248 
249 } } // namespace v8::internal
250 
251 #if V8_TARGET_ARCH_IA32
252 #include "ia32/code-stubs-ia32.h"
253 #elif V8_TARGET_ARCH_X64
254 #include "x64/code-stubs-x64.h"
255 #elif V8_TARGET_ARCH_ARM
256 #include "arm/code-stubs-arm.h"
257 #elif V8_TARGET_ARCH_MIPS
258 #include "mips/code-stubs-mips.h"
259 #else
260 #error Unsupported target architecture.
261 #endif
262 
263 namespace v8 {
264 namespace internal {
265 
266 
267 // RuntimeCallHelper implementation used in stubs: enters/leaves a
268 // newly created internal frame before/after the runtime call.
270  public:
272 
273  virtual void BeforeCall(MacroAssembler* masm) const;
274 
275  virtual void AfterCall(MacroAssembler* masm) const;
276 };
277 
278 
279 // Trivial RuntimeCallHelper implementation.
281  public:
283 
284  virtual void BeforeCall(MacroAssembler* masm) const {}
285 
286  virtual void AfterCall(MacroAssembler* masm) const {}
287 };
288 
289 
290 class StackCheckStub : public CodeStub {
291  public:
293 
294  void Generate(MacroAssembler* masm);
295 
296  private:
297  Major MajorKey() { return StackCheck; }
298  int MinorKey() { return 0; }
299 };
300 
301 
302 class InterruptStub : public CodeStub {
303  public:
305 
306  void Generate(MacroAssembler* masm);
307 
308  private:
309  Major MajorKey() { return Interrupt; }
310  int MinorKey() { return 0; }
311 };
312 
313 
314 class ToNumberStub: public CodeStub {
315  public:
317 
318  void Generate(MacroAssembler* masm);
319 
320  private:
321  Major MajorKey() { return ToNumber; }
322  int MinorKey() { return 0; }
323 };
324 
325 
326 class FastNewClosureStub : public CodeStub {
327  public:
328  explicit FastNewClosureStub(LanguageMode language_mode)
329  : language_mode_(language_mode) { }
330 
331  void Generate(MacroAssembler* masm);
332 
333  private:
334  Major MajorKey() { return FastNewClosure; }
335  int MinorKey() { return language_mode_ == CLASSIC_MODE
337 
338  LanguageMode language_mode_;
339 };
340 
341 
342 class FastNewContextStub : public CodeStub {
343  public:
344  static const int kMaximumSlots = 64;
345 
346  explicit FastNewContextStub(int slots) : slots_(slots) {
347  ASSERT(slots_ > 0 && slots_ <= kMaximumSlots);
348  }
349 
350  void Generate(MacroAssembler* masm);
351 
352  private:
353  int slots_;
354 
355  Major MajorKey() { return FastNewContext; }
356  int MinorKey() { return slots_; }
357 };
358 
359 
360 class FastNewBlockContextStub : public CodeStub {
361  public:
362  static const int kMaximumSlots = 64;
363 
364  explicit FastNewBlockContextStub(int slots) : slots_(slots) {
365  ASSERT(slots_ > 0 && slots_ <= kMaximumSlots);
366  }
367 
368  void Generate(MacroAssembler* masm);
369 
370  private:
371  int slots_;
372 
373  Major MajorKey() { return FastNewBlockContext; }
374  int MinorKey() { return slots_; }
375 };
376 
377 
378 class FastCloneShallowArrayStub : public CodeStub {
379  public:
380  // Maximum length of copied elements array.
381  static const int kMaximumClonedLength = 8;
382 
383  enum Mode {
388  };
389 
390  FastCloneShallowArrayStub(Mode mode, int length)
391  : mode_(mode),
392  length_((mode == COPY_ON_WRITE_ELEMENTS) ? 0 : length) {
393  ASSERT_GE(length_, 0);
395  }
396 
397  void Generate(MacroAssembler* masm);
398 
399  private:
400  Mode mode_;
401  int length_;
402 
403  Major MajorKey() { return FastCloneShallowArray; }
404  int MinorKey() {
405  ASSERT(mode_ == 0 || mode_ == 1 || mode_ == 2 || mode_ == 3);
406  return length_ * 4 + mode_;
407  }
408 };
409 
410 
411 class FastCloneShallowObjectStub : public CodeStub {
412  public:
413  // Maximum number of properties in copied object.
414  static const int kMaximumClonedProperties = 6;
415 
416  explicit FastCloneShallowObjectStub(int length) : length_(length) {
417  ASSERT_GE(length_, 0);
419  }
420 
421  void Generate(MacroAssembler* masm);
422 
423  private:
424  int length_;
425 
426  Major MajorKey() { return FastCloneShallowObject; }
427  int MinorKey() { return length_; }
428 };
429 
430 
431 class InstanceofStub: public CodeStub {
432  public:
433  enum Flags {
434  kNoFlags = 0,
438  };
439 
440  explicit InstanceofStub(Flags flags) : flags_(flags) { }
441 
442  static Register left();
443  static Register right();
444 
445  void Generate(MacroAssembler* masm);
446 
447  private:
448  Major MajorKey() { return Instanceof; }
449  int MinorKey() { return static_cast<int>(flags_); }
450 
451  bool HasArgsInRegisters() const {
452  return (flags_ & kArgsInRegisters) != 0;
453  }
454 
455  bool HasCallSiteInlineCheck() const {
456  return (flags_ & kCallSiteInlineCheck) != 0;
457  }
458 
459  bool ReturnTrueFalseObject() const {
460  return (flags_ & kReturnTrueFalseObject) != 0;
461  }
462 
463  virtual void PrintName(StringStream* stream);
464 
465  Flags flags_;
466 };
467 
468 
469 class MathPowStub: public CodeStub {
470  public:
472 
473  explicit MathPowStub(ExponentType exponent_type)
474  : exponent_type_(exponent_type) { }
475  virtual void Generate(MacroAssembler* masm);
476 
477  private:
478  virtual CodeStub::Major MajorKey() { return MathPow; }
479  virtual int MinorKey() { return exponent_type_; }
480 
481  ExponentType exponent_type_;
482 };
483 
484 
485 class ICCompareStub: public CodeStub {
486  public:
488  : op_(op), state_(state) {
490  }
491 
492  virtual void Generate(MacroAssembler* masm);
493 
494  void set_known_map(Handle<Map> map) { known_map_ = map; }
495 
496  private:
497  class OpField: public BitField<int, 0, 3> { };
498  class StateField: public BitField<int, 3, 5> { };
499 
500  virtual void FinishCode(Handle<Code> code) {
501  code->set_compare_state(state_);
502  code->set_compare_operation(op_ - Token::EQ);
503  }
504 
505  virtual CodeStub::Major MajorKey() { return CompareIC; }
506  virtual int MinorKey();
507 
508  virtual int GetCodeKind() { return Code::COMPARE_IC; }
509 
510  void GenerateSmis(MacroAssembler* masm);
511  void GenerateHeapNumbers(MacroAssembler* masm);
512  void GenerateSymbols(MacroAssembler* masm);
513  void GenerateStrings(MacroAssembler* masm);
514  void GenerateObjects(MacroAssembler* masm);
515  void GenerateMiss(MacroAssembler* masm);
516  void GenerateKnownObjects(MacroAssembler* masm);
517 
518  bool strict() const { return op_ == Token::EQ_STRICT; }
519  Condition GetCondition() const { return CompareIC::ComputeCondition(op_); }
520 
521  virtual void AddToSpecialCache(Handle<Code> new_object);
522  virtual bool FindCodeInSpecialCache(Code** code_out);
523  virtual bool UseSpecialCache() { return state_ == CompareIC::KNOWN_OBJECTS; }
524 
525  Token::Value op_;
526  CompareIC::State state_;
527  Handle<Map> known_map_;
528 };
529 
530 
531 // Flags that control the compare stub code generation.
537 };
538 
539 
543 };
544 
545 
546 class CompareStub: public CodeStub {
547  public:
549  bool strict,
551  Register lhs,
552  Register rhs) :
553  cc_(cc),
554  strict_(strict),
555  never_nan_nan_((flags & CANT_BOTH_BE_NAN) != 0),
556  include_number_compare_((flags & NO_NUMBER_COMPARE_IN_STUB) == 0),
557  include_smi_compare_((flags & NO_SMI_COMPARE_IN_STUB) == 0),
558  lhs_(lhs),
559  rhs_(rhs) { }
560 
562  bool strict,
564  cc_(cc),
565  strict_(strict),
566  never_nan_nan_((flags & CANT_BOTH_BE_NAN) != 0),
567  include_number_compare_((flags & NO_NUMBER_COMPARE_IN_STUB) == 0),
568  include_smi_compare_((flags & NO_SMI_COMPARE_IN_STUB) == 0),
569  lhs_(no_reg),
570  rhs_(no_reg) { }
571 
572  void Generate(MacroAssembler* masm);
573 
574  private:
575  Condition cc_;
576  bool strict_;
577  // Only used for 'equal' comparisons. Tells the stub that we already know
578  // that at least one side of the comparison is not NaN. This allows the
579  // stub to use object identity in the positive case. We ignore it when
580  // generating the minor key for other comparisons to avoid creating more
581  // stubs.
582  bool never_nan_nan_;
583  // Do generate the number comparison code in the stub. Stubs without number
584  // comparison code is used when the number comparison has been inlined, and
585  // the stub will be called if one of the operands is not a number.
586  bool include_number_compare_;
587 
588  // Generate the comparison code for two smi operands in the stub.
589  bool include_smi_compare_;
590 
591  // Register holding the left hand side of the comparison if the stub gives
592  // a choice, no_reg otherwise.
593 
594  Register lhs_;
595  // Register holding the right hand side of the comparison if the stub gives
596  // a choice, no_reg otherwise.
597  Register rhs_;
598 
599  // Encoding of the minor key in 16 bits.
600  class StrictField: public BitField<bool, 0, 1> {};
601  class NeverNanNanField: public BitField<bool, 1, 1> {};
602  class IncludeNumberCompareField: public BitField<bool, 2, 1> {};
603  class IncludeSmiCompareField: public BitField<bool, 3, 1> {};
604  class RegisterField: public BitField<bool, 4, 1> {};
605  class ConditionField: public BitField<int, 5, 11> {};
606 
607  Major MajorKey() { return Compare; }
608 
609  int MinorKey();
610 
611  virtual int GetCodeKind() { return Code::COMPARE_IC; }
612  virtual void FinishCode(Handle<Code> code) {
613  code->set_compare_state(CompareIC::GENERIC);
614  }
615 
616  // Branch to the label if the given object isn't a symbol.
617  void BranchIfNonSymbol(MacroAssembler* masm,
618  Label* label,
619  Register object,
620  Register scratch);
621 
622  // Unfortunately you have to run without snapshots to see most of these
623  // names in the profile since most compare stubs end up in the snapshot.
624  virtual void PrintName(StringStream* stream);
625 };
626 
627 
628 class CEntryStub : public CodeStub {
629  public:
630  explicit CEntryStub(int result_size,
631  SaveFPRegsMode save_doubles = kDontSaveFPRegs)
632  : result_size_(result_size), save_doubles_(save_doubles) { }
633 
634  void Generate(MacroAssembler* masm);
635 
636  // The version of this stub that doesn't save doubles is generated ahead of
637  // time, so it's OK to call it from other stubs that can't cope with GC during
638  // their code generation. On machines that always have gp registers (x64) we
639  // can generate both variants ahead of time.
640  virtual bool IsPregenerated();
641  static void GenerateAheadOfTime();
642 
643  private:
644  void GenerateCore(MacroAssembler* masm,
645  Label* throw_normal_exception,
646  Label* throw_termination_exception,
647  Label* throw_out_of_memory_exception,
648  bool do_gc,
649  bool always_allocate_scope);
650 
651  // Number of pointers/values returned.
652  const int result_size_;
653  SaveFPRegsMode save_doubles_;
654 
655  Major MajorKey() { return CEntry; }
656  int MinorKey();
657 
658  bool NeedsImmovableCode();
659 };
660 
661 
662 class JSEntryStub : public CodeStub {
663  public:
665 
666  void Generate(MacroAssembler* masm) { GenerateBody(masm, false); }
667 
668  protected:
669  void GenerateBody(MacroAssembler* masm, bool is_construct);
670 
671  private:
672  Major MajorKey() { return JSEntry; }
673  int MinorKey() { return 0; }
674 
675  virtual void FinishCode(Handle<Code> code);
676 
677  int handler_offset_;
678 };
679 
680 
682  public:
684 
685  void Generate(MacroAssembler* masm) { GenerateBody(masm, true); }
686 
687  private:
688  int MinorKey() { return 1; }
689 
690  virtual void PrintName(StringStream* stream) {
691  stream->Add("JSConstructEntryStub");
692  }
693 };
694 
695 
696 class ArgumentsAccessStub: public CodeStub {
697  public:
698  enum Type {
703  };
704 
705  explicit ArgumentsAccessStub(Type type) : type_(type) { }
706 
707  private:
708  Type type_;
709 
710  Major MajorKey() { return ArgumentsAccess; }
711  int MinorKey() { return type_; }
712 
713  void Generate(MacroAssembler* masm);
714  void GenerateReadElement(MacroAssembler* masm);
715  void GenerateNewStrict(MacroAssembler* masm);
716  void GenerateNewNonStrictFast(MacroAssembler* masm);
717  void GenerateNewNonStrictSlow(MacroAssembler* masm);
718 
719  virtual void PrintName(StringStream* stream);
720 };
721 
722 
723 class RegExpExecStub: public CodeStub {
724  public:
726 
727  private:
728  Major MajorKey() { return RegExpExec; }
729  int MinorKey() { return 0; }
730 
731  void Generate(MacroAssembler* masm);
732 };
733 
734 
735 class RegExpConstructResultStub: public CodeStub {
736  public:
738 
739  private:
740  Major MajorKey() { return RegExpConstructResult; }
741  int MinorKey() { return 0; }
742 
743  void Generate(MacroAssembler* masm);
744 };
745 
746 
747 class CallFunctionStub: public CodeStub {
748  public:
750  : argc_(argc), flags_(flags) { }
751 
752  void Generate(MacroAssembler* masm);
753 
754  virtual void FinishCode(Handle<Code> code) {
755  code->set_has_function_cache(RecordCallTarget());
756  }
757 
758  static int ExtractArgcFromMinorKey(int minor_key) {
759  return ArgcBits::decode(minor_key);
760  }
761 
762  private:
763  int argc_;
764  CallFunctionFlags flags_;
765 
766  virtual void PrintName(StringStream* stream);
767 
768  // Minor key encoding in 32 bits with Bitfield <Type, shift, size>.
769  class FlagBits: public BitField<CallFunctionFlags, 0, 2> {};
770  class ArgcBits: public BitField<unsigned, 2, 32 - 2> {};
771 
772  Major MajorKey() { return CallFunction; }
773  int MinorKey() {
774  // Encode the parameters in a unique 32 bit value.
775  return FlagBits::encode(flags_) | ArgcBits::encode(argc_);
776  }
777 
778  bool ReceiverMightBeImplicit() {
779  return (flags_ & RECEIVER_MIGHT_BE_IMPLICIT) != 0;
780  }
781 
782  bool RecordCallTarget() {
783  return (flags_ & RECORD_CALL_TARGET) != 0;
784  }
785 };
786 
787 
788 class CallConstructStub: public CodeStub {
789  public:
790  explicit CallConstructStub(CallFunctionFlags flags) : flags_(flags) {}
791 
792  void Generate(MacroAssembler* masm);
793 
794  virtual void FinishCode(Handle<Code> code) {
795  code->set_has_function_cache(RecordCallTarget());
796  }
797 
798  private:
799  CallFunctionFlags flags_;
800 
801  virtual void PrintName(StringStream* stream);
802 
803  Major MajorKey() { return CallConstruct; }
804  int MinorKey() { return flags_; }
805 
806  bool RecordCallTarget() {
807  return (flags_ & RECORD_CALL_TARGET) != 0;
808  }
809 };
810 
811 
813  // Accepts smis or heap numbers.
815 
816  // Accepts smis or heap numbers that are valid array indices
817  // (ECMA-262 15.4). Invalid indices are reported as being out of
818  // range.
820 };
821 
822 
823 // Generates code implementing String.prototype.charCodeAt.
824 //
825 // Only supports the case when the receiver is a string and the index
826 // is a number (smi or heap number) that is a valid index into the
827 // string. Additional index constraints are specified by the
828 // flags. Otherwise, bails out to the provided labels.
829 //
830 // Register usage: |object| may be changed to another string in a way
831 // that doesn't affect charCodeAt/charAt semantics, |index| is
832 // preserved, |scratch| and |result| are clobbered.
834  public:
836  Register index,
837  Register result,
838  Label* receiver_not_string,
839  Label* index_not_number,
840  Label* index_out_of_range,
841  StringIndexFlags index_flags)
842  : object_(object),
843  index_(index),
844  result_(result),
845  receiver_not_string_(receiver_not_string),
846  index_not_number_(index_not_number),
847  index_out_of_range_(index_out_of_range),
848  index_flags_(index_flags) {
849  ASSERT(!result_.is(object_));
850  ASSERT(!result_.is(index_));
851  }
852 
853  // Generates the fast case code. On the fallthrough path |result|
854  // register contains the result.
855  void GenerateFast(MacroAssembler* masm);
856 
857  // Generates the slow case code. Must not be naturally
858  // reachable. Expected to be put after a ret instruction (e.g., in
859  // deferred code). Always jumps back to the fast case.
860  void GenerateSlow(MacroAssembler* masm,
861  const RuntimeCallHelper& call_helper);
862 
863  private:
864  Register object_;
865  Register index_;
866  Register result_;
867 
868  Label* receiver_not_string_;
869  Label* index_not_number_;
870  Label* index_out_of_range_;
871 
872  StringIndexFlags index_flags_;
873 
874  Label call_runtime_;
875  Label index_not_smi_;
876  Label got_smi_index_;
877  Label exit_;
878 
879  DISALLOW_COPY_AND_ASSIGN(StringCharCodeAtGenerator);
880 };
881 
882 
883 // Generates code for creating a one-char string from a char code.
885  public:
887  Register result)
888  : code_(code),
889  result_(result) {
890  ASSERT(!code_.is(result_));
891  }
892 
893  // Generates the fast case code. On the fallthrough path |result|
894  // register contains the result.
895  void GenerateFast(MacroAssembler* masm);
896 
897  // Generates the slow case code. Must not be naturally
898  // reachable. Expected to be put after a ret instruction (e.g., in
899  // deferred code). Always jumps back to the fast case.
900  void GenerateSlow(MacroAssembler* masm,
901  const RuntimeCallHelper& call_helper);
902 
903  private:
904  Register code_;
905  Register result_;
906 
907  Label slow_case_;
908  Label exit_;
909 
910  DISALLOW_COPY_AND_ASSIGN(StringCharFromCodeGenerator);
911 };
912 
913 
914 // Generates code implementing String.prototype.charAt.
915 //
916 // Only supports the case when the receiver is a string and the index
917 // is a number (smi or heap number) that is a valid index into the
918 // string. Additional index constraints are specified by the
919 // flags. Otherwise, bails out to the provided labels.
920 //
921 // Register usage: |object| may be changed to another string in a way
922 // that doesn't affect charCodeAt/charAt semantics, |index| is
923 // preserved, |scratch1|, |scratch2|, and |result| are clobbered.
925  public:
927  Register index,
928  Register scratch,
929  Register result,
930  Label* receiver_not_string,
931  Label* index_not_number,
932  Label* index_out_of_range,
933  StringIndexFlags index_flags)
934  : char_code_at_generator_(object,
935  index,
936  scratch,
937  receiver_not_string,
938  index_not_number,
939  index_out_of_range,
940  index_flags),
941  char_from_code_generator_(scratch, result) {}
942 
943  // Generates the fast case code. On the fallthrough path |result|
944  // register contains the result.
945  void GenerateFast(MacroAssembler* masm);
946 
947  // Generates the slow case code. Must not be naturally
948  // reachable. Expected to be put after a ret instruction (e.g., in
949  // deferred code). Always jumps back to the fast case.
950  void GenerateSlow(MacroAssembler* masm,
951  const RuntimeCallHelper& call_helper);
952 
953  private:
954  StringCharCodeAtGenerator char_code_at_generator_;
955  StringCharFromCodeGenerator char_from_code_generator_;
956 
957  DISALLOW_COPY_AND_ASSIGN(StringCharAtGenerator);
958 };
959 
960 
962  public:
964  : masm_(masm), previous_allow_(masm->allow_stub_calls()) {
965  masm_->set_allow_stub_calls(allow);
966  }
968  masm_->set_allow_stub_calls(previous_allow_);
969  }
970 
971  private:
972  MacroAssembler* masm_;
973  bool previous_allow_;
974 
975  DISALLOW_COPY_AND_ASSIGN(AllowStubCallsScope);
976 };
977 
978 
979 class KeyedLoadElementStub : public CodeStub {
980  public:
981  explicit KeyedLoadElementStub(ElementsKind elements_kind)
982  : elements_kind_(elements_kind)
983  { }
984 
985  Major MajorKey() { return KeyedLoadElement; }
986  int MinorKey() { return elements_kind_; }
987 
988  void Generate(MacroAssembler* masm);
989 
990  private:
991  ElementsKind elements_kind_;
992 
993  DISALLOW_COPY_AND_ASSIGN(KeyedLoadElementStub);
994 };
995 
996 
997 class KeyedStoreElementStub : public CodeStub {
998  public:
999  KeyedStoreElementStub(bool is_js_array,
1000  ElementsKind elements_kind,
1001  KeyedAccessGrowMode grow_mode)
1002  : is_js_array_(is_js_array),
1003  elements_kind_(elements_kind),
1004  grow_mode_(grow_mode),
1005  fp_registers_(CanUseFPRegisters()) { }
1006 
1007  Major MajorKey() { return KeyedStoreElement; }
1008  int MinorKey() {
1009  return ElementsKindBits::encode(elements_kind_) |
1010  IsJSArrayBits::encode(is_js_array_) |
1011  GrowModeBits::encode(grow_mode_) |
1012  FPRegisters::encode(fp_registers_);
1013  }
1014 
1015  void Generate(MacroAssembler* masm);
1016 
1017  private:
1018  class ElementsKindBits: public BitField<ElementsKind, 0, 8> {};
1019  class GrowModeBits: public BitField<KeyedAccessGrowMode, 8, 1> {};
1020  class IsJSArrayBits: public BitField<bool, 9, 1> {};
1021  class FPRegisters: public BitField<bool, 10, 1> {};
1022 
1023  bool is_js_array_;
1024  ElementsKind elements_kind_;
1025  KeyedAccessGrowMode grow_mode_;
1026  bool fp_registers_;
1027 
1028  DISALLOW_COPY_AND_ASSIGN(KeyedStoreElementStub);
1029 };
1030 
1031 
1032 class ToBooleanStub: public CodeStub {
1033  public:
1034  enum Type {
1043  };
1044 
1045  // At most 8 different types can be distinguished, because the Code object
1046  // only has room for a single byte to hold a set of these types. :-P
1048 
1049  class Types {
1050  public:
1051  Types() {}
1052  explicit Types(byte bits) : set_(bits) {}
1053 
1054  bool IsEmpty() const { return set_.IsEmpty(); }
1055  bool Contains(Type type) const { return set_.Contains(type); }
1056  void Add(Type type) { set_.Add(type); }
1057  byte ToByte() const { return set_.ToIntegral(); }
1058  void Print(StringStream* stream) const;
1059  void TraceTransition(Types to) const;
1060  bool Record(Handle<Object> object);
1061  bool NeedsMap() const;
1062  bool CanBeUndetectable() const;
1063 
1064  private:
1065  EnumSet<Type, byte> set_;
1066  };
1067 
1068  static Types no_types() { return Types(); }
1069  static Types all_types() { return Types((1 << NUMBER_OF_TYPES) - 1); }
1070 
1071  explicit ToBooleanStub(Register tos, Types types = Types())
1072  : tos_(tos), types_(types) { }
1073 
1074  void Generate(MacroAssembler* masm);
1075  virtual int GetCodeKind() { return Code::TO_BOOLEAN_IC; }
1076  virtual void PrintName(StringStream* stream);
1077 
1078  virtual bool SometimesSetsUpAFrame() { return false; }
1079 
1080  private:
1081  Major MajorKey() { return ToBoolean; }
1082  int MinorKey() { return (tos_.code() << NUMBER_OF_TYPES) | types_.ToByte(); }
1083 
1084  virtual void FinishCode(Handle<Code> code) {
1085  code->set_to_boolean_state(types_.ToByte());
1086  }
1087 
1088  void CheckOddball(MacroAssembler* masm,
1089  Type type,
1090  Heap::RootListIndex value,
1091  bool result);
1092  void GenerateTypeTransition(MacroAssembler* masm);
1093 
1094  Register tos_;
1095  Types types_;
1096 };
1097 
1098 
1099 class ElementsTransitionAndStoreStub : public CodeStub {
1100  public:
1102  ElementsKind to,
1103  bool is_jsarray,
1104  StrictModeFlag strict_mode,
1105  KeyedAccessGrowMode grow_mode)
1106  : from_(from),
1107  to_(to),
1108  is_jsarray_(is_jsarray),
1109  strict_mode_(strict_mode),
1110  grow_mode_(grow_mode) {}
1111 
1112  private:
1113  class FromBits: public BitField<ElementsKind, 0, 8> {};
1114  class ToBits: public BitField<ElementsKind, 8, 8> {};
1115  class IsJSArrayBits: public BitField<bool, 16, 1> {};
1116  class StrictModeBits: public BitField<StrictModeFlag, 17, 1> {};
1117  class GrowModeBits: public BitField<KeyedAccessGrowMode, 18, 1> {};
1118 
1119  Major MajorKey() { return ElementsTransitionAndStore; }
1120  int MinorKey() {
1121  return FromBits::encode(from_) |
1122  ToBits::encode(to_) |
1123  IsJSArrayBits::encode(is_jsarray_) |
1124  StrictModeBits::encode(strict_mode_) |
1125  GrowModeBits::encode(grow_mode_);
1126  }
1127 
1128  void Generate(MacroAssembler* masm);
1129 
1130  ElementsKind from_;
1131  ElementsKind to_;
1132  bool is_jsarray_;
1133  StrictModeFlag strict_mode_;
1134  KeyedAccessGrowMode grow_mode_;
1135 
1136  DISALLOW_COPY_AND_ASSIGN(ElementsTransitionAndStoreStub);
1137 };
1138 
1139 
1140 class StoreArrayLiteralElementStub : public CodeStub {
1141  public:
1143  : fp_registers_(CanUseFPRegisters()) { }
1144 
1145  private:
1146  class FPRegisters: public BitField<bool, 0, 1> {};
1147 
1148  Major MajorKey() { return StoreArrayLiteralElement; }
1149  int MinorKey() { return FPRegisters::encode(fp_registers_); }
1150 
1151  void Generate(MacroAssembler* masm);
1152 
1153  bool fp_registers_;
1154 
1155  DISALLOW_COPY_AND_ASSIGN(StoreArrayLiteralElementStub);
1156 };
1157 
1158 
1159 class ProfileEntryHookStub : public CodeStub {
1160  public:
1161  explicit ProfileEntryHookStub() {}
1162 
1163  // The profile entry hook function is not allowed to cause a GC.
1164  virtual bool SometimesSetsUpAFrame() { return false; }
1165 
1166  // Generates a call to the entry hook if it's enabled.
1167  static void MaybeCallEntryHook(MacroAssembler* masm);
1168 
1169  // Sets or unsets the entry hook function. Returns true on success,
1170  // false on an attempt to replace a non-NULL entry hook with another
1171  // non-NULL hook.
1172  static bool SetFunctionEntryHook(FunctionEntryHook entry_hook);
1173 
1174  private:
1175  static void EntryHookTrampoline(intptr_t function,
1176  intptr_t stack_pointer);
1177 
1178  Major MajorKey() { return ProfileEntryHook; }
1179  int MinorKey() { return 0; }
1180 
1181  void Generate(MacroAssembler* masm);
1182 
1183  // The current function entry hook.
1184  static FunctionEntryHook entry_hook_;
1185 
1186  DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub);
1187 };
1188 
1189 } } // namespace v8::internal
1190 
1191 #endif // V8_CODE_STUBS_H_
MathPowStub(ExponentType exponent_type)
Definition: code-stubs.h:473
void GenerateFast(MacroAssembler *masm)
void GenerateSlow(MacroAssembler *masm, const RuntimeCallHelper &call_helper)
virtual void FinishCode(Handle< Code > code)
Definition: code-stubs.h:754
void GenerateFast(MacroAssembler *masm)
virtual void AfterCall(MacroAssembler *masm) const
Definition: code-stubs.h:286
void GenerateSlow(MacroAssembler *masm, const RuntimeCallHelper &call_helper)
CallFunctionStub(int argc, CallFunctionFlags flags)
Definition: code-stubs.h:749
virtual void FinishCode(Handle< Code > code)
Definition: code-stubs.h:794
virtual bool SometimesSetsUpAFrame()
Definition: code-stubs.h:1164
void Generate(MacroAssembler *masm)
StringCharFromCodeGenerator(Register code, Register result)
Definition: code-stubs.h:886
static int ExtractArgcFromMinorKey(int minor_key)
Definition: code-stubs.h:758
static bool IsCompareOp(Value op)
Definition: token.h:214
virtual void PrintName(StringStream *stream)
Definition: code-stubs.cc:368
void set_known_map(Handle< Map > map)
Definition: code-stubs.h:494
bool Record(Handle< Object > object)
Definition: code-stubs.cc:401
JSEntryStub()
Definition: code-stubs.h:664
CompareStub(Condition cc, bool strict, CompareFlags flags, Register lhs, Register rhs)
Definition: code-stubs.h:548
void Generate(MacroAssembler *masm)
Definition: code-stubs.h:685
void Generate(MacroAssembler *masm)
virtual bool IsPregenerated()
void Generate(MacroAssembler *masm)
#define ASSERT(condition)
Definition: checks.h:270
#define ASSERT_GE(v1, v2)
Definition: checks.h:273
virtual void AfterCall(MacroAssembler *masm) const
static bool SetFunctionEntryHook(FunctionEntryHook entry_hook)
Definition: code-stubs.cc:494
bool IsEmpty() const
Definition: utils.h:968
Definition: code-stubs.h:1159
static const int kMaximumSlots
Definition: code-stubs.h:344
#define CHECK(condition)
Definition: checks.h:56
ProfileEntryHookStub()
Definition: code-stubs.h:1161
void Generate(MacroAssembler *masm)
virtual bool SometimesSetsUpAFrame()
Definition: code-stubs.h:1078
void Generate(MacroAssembler *masm)
Definition: code-stubs.h:666
uint8_t byte
Definition: globals.h:156
KeyedStoreElementStub(bool is_js_array, ElementsKind elements_kind, KeyedAccessGrowMode grow_mode)
Definition: code-stubs.h:999
STATIC_ASSERT(NUMBER_OF_TYPES<=8)
void(* FunctionEntryHook)(uintptr_t function, uintptr_t return_addr_location)
Definition: v8.h:2965
virtual void AfterCall(MacroAssembler *masm) const =0
virtual bool IsPregenerated()
Definition: code-stubs.h:149
static Condition ComputeCondition(Token::Value op)
CallConstructStub(CallFunctionFlags flags)
Definition: code-stubs.h:790
void Generate(MacroAssembler *masm)
virtual void BeforeCall(MacroAssembler *masm) const =0
StringCharCodeAtGenerator(Register object, Register index, Register result, Label *receiver_not_string, Label *index_not_number, Label *index_out_of_range, StringIndexFlags index_flags)
Definition: code-stubs.h:835
StringCharAtGenerator(Register object, Register index, Register scratch, Register result, Label *receiver_not_string, Label *index_not_number, Label *index_out_of_range, StringIndexFlags index_flags)
Definition: code-stubs.h:926
virtual void BeforeCall(MacroAssembler *masm) const
Definition: code-stubs.h:284
int Compare(const T &a, const T &b)
Definition: utils.h:156
static void MaybeCallEntryHook(MacroAssembler *masm)
ToBooleanStub(Register tos, Types types=Types())
Definition: code-stubs.h:1071
void Generate(MacroAssembler *masm)
#define ASSERT_LE(v1, v2)
Definition: checks.h:275
ElementsTransitionAndStoreStub(ElementsKind from, ElementsKind to, bool is_jsarray, StrictModeFlag strict_mode, KeyedAccessGrowMode grow_mode)
Definition: code-stubs.h:1101
AllowStubCallsScope(MacroAssembler *masm, bool allow)
Definition: code-stubs.h:963
Definition: code-stubs.h:681
#define BASE_EMBEDDED
Definition: allocation.h:68
void Generate(MacroAssembler *masm)
void GenerateSlow(MacroAssembler *masm, const RuntimeCallHelper &call_helper)
virtual void Generate(MacroAssembler *masm)
virtual bool SometimesSetsUpAFrame()
Definition: code-stubs.h:160
void Generate(MacroAssembler *masm)
int ToNumber(Register reg)
bool is(Register reg) const
#define DEF_ENUM(name)
Definition: code-stubs.h:115
static Major GetMajorKey(Code *code_stub)
Definition: code-stubs.h:133
void Generate(MacroAssembler *masm)
bool Contains(E element) const
Definition: utils.h:969
T ToIntegral() const
Definition: utils.h:979
void GenerateBody(MacroAssembler *masm, bool is_construct)
FastNewClosureStub(LanguageMode language_mode)
Definition: code-stubs.h:328
static void GenerateAheadOfTime()
void Generate(MacroAssembler *masm)
CompareStub(Condition cc, bool strict, CompareFlags flags)
Definition: code-stubs.h:561
void Generate(MacroAssembler *masm)
Definition: code-stubs.cc:305
void GenerateFast(MacroAssembler *masm)
void TraceTransition(Types to) const
Definition: code-stubs.cc:386
Definition: code-stubs.h:628
activate correct semantics for inheriting readonliness enable harmony semantics for typeof enable harmony enable harmony proxies enable all harmony harmony_scoping harmony_proxies harmony_scoping tracks arrays with only smi values automatically unbox arrays of doubles use crankshaft use hydrogen range analysis use hydrogen global value numbering use function inlining maximum number of AST nodes considered for a single inlining loop invariant code motion print statistics for hydrogen trace generated IR for specified phases trace register allocator trace range analysis trace representation types environment for every instruction put a break point before deoptimizing polymorphic inlining perform array bounds checks elimination use dead code elimination trace on stack replacement optimize closures cache optimized code for closures functions with arguments object loop weight for representation inference allow uint32 values on optimize frames if they are used only in safe operations track parallel recompilation enable all profiler experiments number of stack frames inspected by the profiler call recompile stub directly when self optimizing trigger profiler ticks based on counting instead of timing weight back edges by jump distance for interrupt triggering percentage of ICs that must have type info to allow optimization watch_ic_patching retry_self_opt interrupt_at_exit extra verbose compilation tracing generate extra emit comments in code disassembly enable use of SSE3 instructions if available enable use of CMOV instruction if available enable use of SAHF instruction if enable use of VFP3 instructions if available this implies enabling ARMv7 and VFP2 enable use of VFP2 instructions if available enable use of SDIV and UDIV instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of MIPS FPU instructions if NULL
Definition: flags.cc:301
FastCloneShallowArrayStub(Mode mode, int length)
Definition: code-stubs.h:390
const Register no_reg
activate correct semantics for inheriting readonliness enable harmony semantics for typeof enable harmony enable harmony proxies enable all harmony harmony_scoping harmony_proxies harmony_scoping tracks arrays with only smi values automatically unbox arrays of doubles use crankshaft use hydrogen range analysis use hydrogen global value numbering use function inlining maximum number of AST nodes considered for a single inlining loop invariant code motion print statistics for hydrogen trace generated IR for specified phases trace register allocator trace range analysis trace representation types environment for every instruction put a break point before deoptimizing polymorphic inlining perform array bounds checks elimination use dead code elimination trace on stack replacement optimize closures cache optimized code for closures functions with arguments object loop weight for representation inference allow uint32 values on optimize frames if they are used only in safe operations track parallel recompilation enable all profiler experiments number of stack frames inspected by the profiler call recompile stub directly when self optimizing trigger profiler ticks based on counting instead of timing weight back edges by jump distance for interrupt triggering percentage of ICs that must have type info to allow optimization watch_ic_patching retry_self_opt interrupt_at_exit extra verbose compilation tracing generate extra code(assertions) for debugging") DEFINE_bool(code_comments
bool Contains(Type type) const
Definition: code-stubs.h:1055
KeyedLoadElementStub(ElementsKind elements_kind)
Definition: code-stubs.h:981
static Major MajorKeyFromKey(uint32_t key)
Definition: code-stubs.h:125
virtual void Generate(MacroAssembler *masm)
Definition: code-stubs.cc:211
virtual void BeforeCall(MacroAssembler *masm) const
KeyedAccessGrowMode
Definition: objects.h:142
Definition: code-stubs.h:662
activate correct semantics for inheriting readonliness enable harmony semantics for typeof enable harmony enable harmony proxies enable all harmony harmony_scoping harmony_proxies harmony_scoping tracks arrays with only smi values automatically unbox arrays of doubles use crankshaft use hydrogen range analysis use hydrogen global value numbering use function inlining maximum number of AST nodes considered for a single inlining loop invariant code motion print statistics for hydrogen trace generated IR for specified phases trace register allocator trace range analysis trace representation types environment for every instruction put a break point before deoptimizing polymorphic inlining perform array bounds checks elimination use dead code elimination trace on stack replacement optimize closures cache optimized code for closures functions with arguments object loop weight for representation inference allow uint32 values on optimize frames if they are used only in safe operations track parallel recompilation enable all profiler experiments number of stack frames inspected by the profiler call recompile stub directly when self optimizing trigger profiler ticks based on counting instead of timing weight back edges by jump distance for interrupt triggering percentage of ICs that must have type info to allow optimization watch_ic_patching retry_self_opt interrupt_at_exit extra verbose compilation tracing generate extra emit comments in code disassembly enable use of SSE3 instructions if available enable use of CMOV instruction if available enable use of SAHF instruction if enable use of VFP3 instructions if available this implies enabling ARMv7 and VFP2 enable use of VFP2 instructions if available enable use of SDIV and UDIV instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of MIPS FPU instructions if expose natives in global object expose gc extension number of stack frames to capture disable builtin natives files print a stack trace if an assertion failure occurs use random jit cookie to mask large constants trace lazy optimization use adaptive optimizations prepare for turning on always opt minimum length for automatic enable preparsing maximum number of optimization attempts before giving up cache prototype transitions automatically set the debug break flag when debugger commands are in the queue always cause a debug break before aborting maximum length of function source code printed in a stack trace max size of the new max size of the old max size of executable always perform global GCs print one trace line following each garbage collection do not print trace line after scavenger collection print more details following each garbage collection print amount of external allocated memory after each time it is adjusted flush code that we expect not to use again before full gc do incremental marking steps track object counts and memory usage use caching Perform compaction on every full GC Never perform compaction on full GC testing only Compact code space on full incremental collections Default seed for initializing random allows verbose printing trace parsing and preparsing Check icache flushes in ARM and MIPS simulator Stack alingment in bytes in print stack trace when throwing exceptions randomize hashes to avoid predictable hash Fixed seed to use to hash property activate a timer that switches between V8 threads testing_bool_flag float flag Seed used for threading test randomness A filename with extra code to be included in the Print usage including flags
Definition: flags.cc:495
void Add(E element)
Definition: utils.h:973
#define CODE_STUB_LIST(V)
Definition: code-stubs.h:101
void Generate(MacroAssembler *masm)
void Print(StringStream *stream) const
Definition: code-stubs.cc:374
void Generate(MacroAssembler *masm)
CEntryStub(int result_size, SaveFPRegsMode save_doubles=kDontSaveFPRegs)
Definition: code-stubs.h:630
void Generate(MacroAssembler *masm)
Definition: code-stubs.cc:272
void Generate(MacroAssembler *masm)
JSConstructEntryStub()
Definition: code-stubs.h:683
ICCompareStub(Token::Value op, CompareIC::State state)
Definition: code-stubs.h:487
static int MinorKeyFromKey(uint32_t key)
Definition: code-stubs.h:128
void Generate(MacroAssembler *masm)