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

Side by Side Diff: src/code-stubs.h

Issue 139973004: A64: Synchronize with r15814. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 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/circular-queue-inl.h ('k') | src/code-stubs.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 392
393 virtual void AfterCall(MacroAssembler* masm) const = 0; 393 virtual void AfterCall(MacroAssembler* masm) const = 0;
394 394
395 protected: 395 protected:
396 RuntimeCallHelper() {} 396 RuntimeCallHelper() {}
397 397
398 private: 398 private:
399 DISALLOW_COPY_AND_ASSIGN(RuntimeCallHelper); 399 DISALLOW_COPY_AND_ASSIGN(RuntimeCallHelper);
400 }; 400 };
401 401
402
403 // TODO(bmeurer): Move to the StringAddStub declaration once we're
404 // done with the translation to a hydrogen code stub.
405 enum StringAddFlags {
406 // Omit both parameter checks.
407 STRING_ADD_CHECK_NONE = 0,
408 // Check left parameter.
409 STRING_ADD_CHECK_LEFT = 1 << 0,
410 // Check right parameter.
411 STRING_ADD_CHECK_RIGHT = 1 << 1,
412 // Check both parameters.
413 STRING_ADD_CHECK_BOTH = STRING_ADD_CHECK_LEFT | STRING_ADD_CHECK_RIGHT,
414 // Stub needs a frame before calling the runtime
415 STRING_ADD_ERECT_FRAME = 1 << 2
416 };
417
402 } } // namespace v8::internal 418 } } // namespace v8::internal
403 419
404 #if V8_TARGET_ARCH_IA32 420 #if V8_TARGET_ARCH_IA32
405 #include "ia32/code-stubs-ia32.h" 421 #include "ia32/code-stubs-ia32.h"
406 #elif V8_TARGET_ARCH_X64 422 #elif V8_TARGET_ARCH_X64
407 #include "x64/code-stubs-x64.h" 423 #include "x64/code-stubs-x64.h"
408 #elif V8_TARGET_ARCH_A64 424 #elif V8_TARGET_ARCH_A64
409 #include "a64/code-stubs-a64.h" 425 #include "a64/code-stubs-a64.h"
410 #elif V8_TARGET_ARCH_ARM 426 #elif V8_TARGET_ARCH_ARM
411 #include "arm/code-stubs-arm.h" 427 #include "arm/code-stubs-arm.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 InterruptStub() { } 475 InterruptStub() { }
460 476
461 void Generate(MacroAssembler* masm); 477 void Generate(MacroAssembler* masm);
462 478
463 private: 479 private:
464 Major MajorKey() { return Interrupt; } 480 Major MajorKey() { return Interrupt; }
465 int MinorKey() { return 0; } 481 int MinorKey() { return 0; }
466 }; 482 };
467 483
468 484
469 class ToNumberStub: public PlatformCodeStub { 485 class ToNumberStub: public HydrogenCodeStub {
470 public: 486 public:
471 ToNumberStub() { } 487 ToNumberStub() { }
472 488
473 void Generate(MacroAssembler* masm); 489 virtual Handle<Code> GenerateCode();
490
491 virtual void InitializeInterfaceDescriptor(
492 Isolate* isolate,
493 CodeStubInterfaceDescriptor* descriptor);
474 494
475 private: 495 private:
476 Major MajorKey() { return ToNumber; } 496 Major MajorKey() { return ToNumber; }
477 int MinorKey() { return 0; } 497 int NotMissMinorKey() { return 0; }
478 }; 498 };
479 499
480 500
481 class FastNewClosureStub : public PlatformCodeStub { 501 class FastNewClosureStub : public PlatformCodeStub {
482 public: 502 public:
483 explicit FastNewClosureStub(LanguageMode language_mode, bool is_generator) 503 explicit FastNewClosureStub(LanguageMode language_mode, bool is_generator)
484 : language_mode_(language_mode), 504 : language_mode_(language_mode),
485 is_generator_(is_generator) { } 505 is_generator_(is_generator) { }
486 506
487 void Generate(MacroAssembler* masm); 507 void Generate(MacroAssembler* masm);
(...skipping 1779 matching lines...) Expand 10 before | Expand all | Expand 10 after
2267 Major MajorKey() { return ToBoolean; } 2287 Major MajorKey() { return ToBoolean; }
2268 int NotMissMinorKey() { return GetExtraICState(); } 2288 int NotMissMinorKey() { return GetExtraICState(); }
2269 2289
2270 explicit ToBooleanStub(InitializationState init_state) : 2290 explicit ToBooleanStub(InitializationState init_state) :
2271 HydrogenCodeStub(init_state) {} 2291 HydrogenCodeStub(init_state) {}
2272 2292
2273 Types types_; 2293 Types types_;
2274 }; 2294 };
2275 2295
2276 2296
2277 class ElementsTransitionAndStoreStub : public PlatformCodeStub { 2297 class ElementsTransitionAndStoreStub : public HydrogenCodeStub {
2278 public: 2298 public:
2279 ElementsTransitionAndStoreStub(ElementsKind from, 2299 ElementsTransitionAndStoreStub(ElementsKind from_kind,
2280 ElementsKind to, 2300 ElementsKind to_kind,
2281 bool is_jsarray, 2301 bool is_jsarray,
2282 StrictModeFlag strict_mode,
2283 KeyedAccessStoreMode store_mode) 2302 KeyedAccessStoreMode store_mode)
2303 : from_kind_(from_kind),
2304 to_kind_(to_kind),
2305 is_jsarray_(is_jsarray),
2306 store_mode_(store_mode) {}
2307
2308 ElementsKind from_kind() const { return from_kind_; }
2309 ElementsKind to_kind() const { return to_kind_; }
2310 bool is_jsarray() const { return is_jsarray_; }
2311 KeyedAccessStoreMode store_mode() const { return store_mode_; }
2312
2313 Handle<Code> GenerateCode();
2314
2315 void InitializeInterfaceDescriptor(
2316 Isolate* isolate,
2317 CodeStubInterfaceDescriptor* descriptor);
2318
2319 private:
2320 class FromBits: public BitField<ElementsKind, 0, 8> {};
2321 class ToBits: public BitField<ElementsKind, 8, 8> {};
2322 class IsJSArrayBits: public BitField<bool, 16, 1> {};
2323 class StoreModeBits: public BitField<KeyedAccessStoreMode, 17, 4> {};
2324
2325 Major MajorKey() { return ElementsTransitionAndStore; }
2326 int NotMissMinorKey() {
2327 return FromBits::encode(from_kind_) |
2328 ToBits::encode(to_kind_) |
2329 IsJSArrayBits::encode(is_jsarray_) |
2330 StoreModeBits::encode(store_mode_);
2331 }
2332
2333 ElementsKind from_kind_;
2334 ElementsKind to_kind_;
2335 bool is_jsarray_;
2336 KeyedAccessStoreMode store_mode_;
2337
2338 DISALLOW_COPY_AND_ASSIGN(ElementsTransitionAndStoreStub);
2339 };
2340
2341
2342 // TODO(bmeurer) Remove this when compiled transitions is enabled
2343 class ElementsTransitionAndStorePlatformStub : public PlatformCodeStub {
2344 public:
2345 ElementsTransitionAndStorePlatformStub(ElementsKind from,
2346 ElementsKind to,
2347 bool is_jsarray,
2348 StrictModeFlag strict_mode,
2349 KeyedAccessStoreMode store_mode)
2284 : from_(from), 2350 : from_(from),
2285 to_(to), 2351 to_(to),
2286 is_jsarray_(is_jsarray), 2352 is_jsarray_(is_jsarray),
2287 strict_mode_(strict_mode), 2353 strict_mode_(strict_mode),
2288 store_mode_(store_mode) {} 2354 store_mode_(store_mode) {}
2289 2355
2290 private: 2356 private:
2291 class FromBits: public BitField<ElementsKind, 0, 8> {}; 2357 class FromBits: public BitField<ElementsKind, 0, 8> {};
2292 class ToBits: public BitField<ElementsKind, 8, 8> {}; 2358 class ToBits: public BitField<ElementsKind, 8, 8> {};
2293 class IsJSArrayBits: public BitField<bool, 16, 1> {}; 2359 class IsJSArrayBits: public BitField<bool, 16, 1> {};
(...skipping 10 matching lines...) Expand all
2304 } 2370 }
2305 2371
2306 void Generate(MacroAssembler* masm); 2372 void Generate(MacroAssembler* masm);
2307 2373
2308 ElementsKind from_; 2374 ElementsKind from_;
2309 ElementsKind to_; 2375 ElementsKind to_;
2310 bool is_jsarray_; 2376 bool is_jsarray_;
2311 StrictModeFlag strict_mode_; 2377 StrictModeFlag strict_mode_;
2312 KeyedAccessStoreMode store_mode_; 2378 KeyedAccessStoreMode store_mode_;
2313 2379
2314 DISALLOW_COPY_AND_ASSIGN(ElementsTransitionAndStoreStub); 2380 DISALLOW_COPY_AND_ASSIGN(ElementsTransitionAndStorePlatformStub);
2315 }; 2381 };
2316 2382
2317 2383
2318 class StoreArrayLiteralElementStub : public PlatformCodeStub { 2384 class StoreArrayLiteralElementStub : public PlatformCodeStub {
2319 public: 2385 public:
2320 StoreArrayLiteralElementStub() 2386 StoreArrayLiteralElementStub()
2321 : fp_registers_(CanUseFPRegisters()) { } 2387 : fp_registers_(CanUseFPRegisters()) { }
2322 2388
2323 private: 2389 private:
2324 class FPRegisters: public BitField<bool, 0, 1> {}; 2390 class FPRegisters: public BitField<bool, 0, 1> {};
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
2380 int MinorKey() { return 0; } 2446 int MinorKey() { return 0; }
2381 2447
2382 void Generate(MacroAssembler* masm); 2448 void Generate(MacroAssembler* masm);
2383 2449
2384 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); 2450 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub);
2385 }; 2451 };
2386 2452
2387 } } // namespace v8::internal 2453 } } // namespace v8::internal
2388 2454
2389 #endif // V8_CODE_STUBS_H_ 2455 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/circular-queue-inl.h ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698