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

Side by Side Diff: src/ic.h

Issue 7849017: Mechanical refactor to move ElementsKind type out of JSObject. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: latest changes Created 9 years, 3 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/ia32/stub-cache-ia32.cc ('k') | src/ic.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 }; 341 };
342 342
343 343
344 class KeyedIC: public IC { 344 class KeyedIC: public IC {
345 public: 345 public:
346 explicit KeyedIC(Isolate* isolate) : IC(NO_EXTRA_FRAME, isolate) {} 346 explicit KeyedIC(Isolate* isolate) : IC(NO_EXTRA_FRAME, isolate) {}
347 virtual ~KeyedIC() {} 347 virtual ~KeyedIC() {}
348 348
349 virtual MaybeObject* GetElementStubWithoutMapCheck( 349 virtual MaybeObject* GetElementStubWithoutMapCheck(
350 bool is_js_array, 350 bool is_js_array,
351 JSObject::ElementsKind elements_kind) = 0; 351 ElementsKind elements_kind) = 0;
352 352
353 protected: 353 protected:
354 virtual Code* string_stub() { 354 virtual Code* string_stub() {
355 return NULL; 355 return NULL;
356 } 356 }
357 357
358 virtual Code::Kind kind() const = 0; 358 virtual Code::Kind kind() const = 0;
359 359
360 MaybeObject* ComputeStub(JSObject* receiver, 360 MaybeObject* ComputeStub(JSObject* receiver,
361 bool is_store, 361 bool is_store,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 408
409 // Bit mask to be tested against bit field for the cases when 409 // Bit mask to be tested against bit field for the cases when
410 // generic stub should go into slow case. 410 // generic stub should go into slow case.
411 // Access check is necessary explicitly since generic stub does not perform 411 // Access check is necessary explicitly since generic stub does not perform
412 // map checks. 412 // map checks.
413 static const int kSlowCaseBitFieldMask = 413 static const int kSlowCaseBitFieldMask =
414 (1 << Map::kIsAccessCheckNeeded) | (1 << Map::kHasIndexedInterceptor); 414 (1 << Map::kIsAccessCheckNeeded) | (1 << Map::kHasIndexedInterceptor);
415 415
416 virtual MaybeObject* GetElementStubWithoutMapCheck( 416 virtual MaybeObject* GetElementStubWithoutMapCheck(
417 bool is_js_array, 417 bool is_js_array,
418 JSObject::ElementsKind elements_kind); 418 ElementsKind elements_kind);
419 419
420 protected: 420 protected:
421 virtual Code::Kind kind() const { return Code::KEYED_LOAD_IC; } 421 virtual Code::Kind kind() const { return Code::KEYED_LOAD_IC; }
422 422
423 virtual MaybeObject* ConstructMegamorphicStub( 423 virtual MaybeObject* ConstructMegamorphicStub(
424 MapList* receiver_maps, 424 MapList* receiver_maps,
425 CodeList* targets, 425 CodeList* targets,
426 StrictModeFlag strict_mode); 426 StrictModeFlag strict_mode);
427 427
428 virtual Code* string_stub() { 428 virtual Code* string_stub() {
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 } 559 }
560 static void GenerateMiss(MacroAssembler* masm, bool force_generic); 560 static void GenerateMiss(MacroAssembler* masm, bool force_generic);
561 static void GenerateSlow(MacroAssembler* masm); 561 static void GenerateSlow(MacroAssembler* masm);
562 static void GenerateRuntimeSetProperty(MacroAssembler* masm, 562 static void GenerateRuntimeSetProperty(MacroAssembler* masm,
563 StrictModeFlag strict_mode); 563 StrictModeFlag strict_mode);
564 static void GenerateGeneric(MacroAssembler* masm, StrictModeFlag strict_mode); 564 static void GenerateGeneric(MacroAssembler* masm, StrictModeFlag strict_mode);
565 static void GenerateNonStrictArguments(MacroAssembler* masm); 565 static void GenerateNonStrictArguments(MacroAssembler* masm);
566 566
567 virtual MaybeObject* GetElementStubWithoutMapCheck( 567 virtual MaybeObject* GetElementStubWithoutMapCheck(
568 bool is_js_array, 568 bool is_js_array,
569 JSObject::ElementsKind elements_kind); 569 ElementsKind elements_kind);
570 570
571 protected: 571 protected:
572 virtual Code::Kind kind() const { return Code::KEYED_STORE_IC; } 572 virtual Code::Kind kind() const { return Code::KEYED_STORE_IC; }
573 573
574 virtual MaybeObject* ConstructMegamorphicStub( 574 virtual MaybeObject* ConstructMegamorphicStub(
575 MapList* receiver_maps, 575 MapList* receiver_maps,
576 CodeList* targets, 576 CodeList* targets,
577 StrictModeFlag strict_mode); 577 StrictModeFlag strict_mode);
578 578
579 private: 579 private:
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 void patch(Code* code); 729 void patch(Code* code);
730 }; 730 };
731 731
732 732
733 // Helper for BinaryOpIC and CompareIC. 733 // Helper for BinaryOpIC and CompareIC.
734 void PatchInlinedSmiCode(Address address); 734 void PatchInlinedSmiCode(Address address);
735 735
736 } } // namespace v8::internal 736 } } // namespace v8::internal
737 737
738 #endif // V8_IC_H_ 738 #endif // V8_IC_H_
OLDNEW
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698