| OLD | NEW |
| 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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 Object* LoadCallbackProperty(Arguments args); | 305 Object* LoadCallbackProperty(Arguments args); |
| 306 Object* StoreCallbackProperty(Arguments args); | 306 Object* StoreCallbackProperty(Arguments args); |
| 307 | 307 |
| 308 | 308 |
| 309 // Support functions for IC stubs for interceptors. | 309 // Support functions for IC stubs for interceptors. |
| 310 Object* LoadPropertyWithInterceptorOnly(Arguments args); | 310 Object* LoadPropertyWithInterceptorOnly(Arguments args); |
| 311 Object* LoadPropertyWithInterceptorForLoad(Arguments args); | 311 Object* LoadPropertyWithInterceptorForLoad(Arguments args); |
| 312 Object* LoadPropertyWithInterceptorForCall(Arguments args); | 312 Object* LoadPropertyWithInterceptorForCall(Arguments args); |
| 313 Object* StoreInterceptorProperty(Arguments args); | 313 Object* StoreInterceptorProperty(Arguments args); |
| 314 Object* CallInterceptorProperty(Arguments args); | 314 Object* CallInterceptorProperty(Arguments args); |
| 315 Object* KeyedLoadPropertyWithInterceptor(Arguments args); |
| 315 | 316 |
| 316 | 317 |
| 317 // Support function for computing call IC miss stubs. | 318 // Support function for computing call IC miss stubs. |
| 318 Handle<Code> ComputeCallMiss(int argc); | 319 Handle<Code> ComputeCallMiss(int argc); |
| 319 | 320 |
| 320 | 321 |
| 321 // The stub compiler compiles stubs for the stub cache. | 322 // The stub compiler compiles stubs for the stub cache. |
| 322 class StubCompiler BASE_EMBEDDED { | 323 class StubCompiler BASE_EMBEDDED { |
| 323 public: | 324 public: |
| 324 enum CheckType { | 325 enum CheckType { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 339 #ifdef ENABLE_DEBUGGER_SUPPORT | 340 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 340 Object* CompileCallDebugBreak(Code::Flags flags); | 341 Object* CompileCallDebugBreak(Code::Flags flags); |
| 341 Object* CompileCallDebugPrepareStepIn(Code::Flags flags); | 342 Object* CompileCallDebugPrepareStepIn(Code::Flags flags); |
| 342 #endif | 343 #endif |
| 343 Object* CompileLazyCompile(Code::Flags flags); | 344 Object* CompileLazyCompile(Code::Flags flags); |
| 344 | 345 |
| 345 // Static functions for generating parts of stubs. | 346 // Static functions for generating parts of stubs. |
| 346 static void GenerateLoadGlobalFunctionPrototype(MacroAssembler* masm, | 347 static void GenerateLoadGlobalFunctionPrototype(MacroAssembler* masm, |
| 347 int index, | 348 int index, |
| 348 Register prototype); | 349 Register prototype); |
| 350 |
| 349 static void GenerateFastPropertyLoad(MacroAssembler* masm, | 351 static void GenerateFastPropertyLoad(MacroAssembler* masm, |
| 350 Register dst, Register src, | 352 Register dst, Register src, |
| 351 JSObject* holder, int index); | 353 JSObject* holder, int index); |
| 352 | 354 |
| 353 static void GenerateLoadArrayLength(MacroAssembler* masm, | 355 static void GenerateLoadArrayLength(MacroAssembler* masm, |
| 354 Register receiver, | 356 Register receiver, |
| 355 Register scratch, | 357 Register scratch, |
| 356 Label* miss_label); | 358 Label* miss_label); |
| 359 |
| 357 static void GenerateLoadStringLength(MacroAssembler* masm, | 360 static void GenerateLoadStringLength(MacroAssembler* masm, |
| 358 Register receiver, | 361 Register receiver, |
| 359 Register scratch, | 362 Register scratch1, |
| 363 Register scratch2, |
| 360 Label* miss_label); | 364 Label* miss_label); |
| 361 static void GenerateLoadStringLength2(MacroAssembler* masm, | 365 |
| 362 Register receiver, | |
| 363 Register scratch1, | |
| 364 Register scratch2, | |
| 365 Label* miss_label); | |
| 366 static void GenerateLoadFunctionPrototype(MacroAssembler* masm, | 366 static void GenerateLoadFunctionPrototype(MacroAssembler* masm, |
| 367 Register receiver, | 367 Register receiver, |
| 368 Register scratch1, | 368 Register scratch1, |
| 369 Register scratch2, | 369 Register scratch2, |
| 370 Label* miss_label); | 370 Label* miss_label); |
| 371 |
| 371 static void GenerateStoreField(MacroAssembler* masm, | 372 static void GenerateStoreField(MacroAssembler* masm, |
| 372 Builtins::Name storage_extend, | |
| 373 JSObject* object, | 373 JSObject* object, |
| 374 int index, | 374 int index, |
| 375 Map* transition, | 375 Map* transition, |
| 376 Register receiver_reg, | 376 Register receiver_reg, |
| 377 Register name_reg, | 377 Register name_reg, |
| 378 Register scratch, | 378 Register scratch, |
| 379 Label* miss_label); | 379 Label* miss_label); |
| 380 |
| 380 static void GenerateLoadMiss(MacroAssembler* masm, Code::Kind kind); | 381 static void GenerateLoadMiss(MacroAssembler* masm, Code::Kind kind); |
| 381 | 382 |
| 382 // Check the integrity of the prototype chain to make sure that the | 383 // Check the integrity of the prototype chain to make sure that the |
| 383 // current IC is still valid. | 384 // current IC is still valid. |
| 385 |
| 384 Register CheckPrototypes(JSObject* object, | 386 Register CheckPrototypes(JSObject* object, |
| 385 Register object_reg, | 387 Register object_reg, |
| 386 JSObject* holder, | 388 JSObject* holder, |
| 387 Register holder_reg, | 389 Register holder_reg, |
| 388 Register scratch, | 390 Register scratch, |
| 389 String* name, | 391 String* name, |
| 392 Label* miss) { |
| 393 return CheckPrototypes(object, object_reg, holder, holder_reg, scratch, |
| 394 name, kInvalidProtoDepth, miss); |
| 395 } |
| 396 |
| 397 Register CheckPrototypes(JSObject* object, |
| 398 Register object_reg, |
| 399 JSObject* holder, |
| 400 Register holder_reg, |
| 401 Register scratch, |
| 402 String* name, |
| 403 int save_at_depth, |
| 390 Label* miss); | 404 Label* miss); |
| 391 | 405 |
| 392 protected: | 406 protected: |
| 393 Object* GetCodeWithFlags(Code::Flags flags, const char* name); | 407 Object* GetCodeWithFlags(Code::Flags flags, const char* name); |
| 394 Object* GetCodeWithFlags(Code::Flags flags, String* name); | 408 Object* GetCodeWithFlags(Code::Flags flags, String* name); |
| 395 | 409 |
| 396 MacroAssembler* masm() { return &masm_; } | 410 MacroAssembler* masm() { return &masm_; } |
| 397 void set_failure(Failure* failure) { failure_ = failure; } | 411 void set_failure(Failure* failure) { failure_ = failure; } |
| 398 | 412 |
| 399 void GenerateLoadField(JSObject* object, | 413 void GenerateLoadField(JSObject* object, |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 private: | 545 private: |
| 532 Object* GetCode(PropertyType type, String* name); | 546 Object* GetCode(PropertyType type, String* name); |
| 533 }; | 547 }; |
| 534 | 548 |
| 535 | 549 |
| 536 class CallStubCompiler: public StubCompiler { | 550 class CallStubCompiler: public StubCompiler { |
| 537 public: | 551 public: |
| 538 explicit CallStubCompiler(int argc, InLoopFlag in_loop) | 552 explicit CallStubCompiler(int argc, InLoopFlag in_loop) |
| 539 : arguments_(argc), in_loop_(in_loop) { } | 553 : arguments_(argc), in_loop_(in_loop) { } |
| 540 | 554 |
| 541 Object* CompileCallField(Object* object, | 555 Object* CompileCallField(JSObject* object, |
| 542 JSObject* holder, | 556 JSObject* holder, |
| 543 int index, | 557 int index, |
| 544 String* name); | 558 String* name); |
| 545 Object* CompileCallConstant(Object* object, | 559 Object* CompileCallConstant(Object* object, |
| 546 JSObject* holder, | 560 JSObject* holder, |
| 547 JSFunction* function, | 561 JSFunction* function, |
| 548 String* name, | 562 String* name, |
| 549 CheckType check); | 563 CheckType check); |
| 550 Object* CompileCallInterceptor(Object* object, | 564 Object* CompileCallInterceptor(JSObject* object, |
| 551 JSObject* holder, | 565 JSObject* holder, |
| 552 String* name); | 566 String* name); |
| 553 Object* CompileCallGlobal(JSObject* object, | 567 Object* CompileCallGlobal(JSObject* object, |
| 554 GlobalObject* holder, | 568 GlobalObject* holder, |
| 555 JSGlobalPropertyCell* cell, | 569 JSGlobalPropertyCell* cell, |
| 556 JSFunction* function, | 570 JSFunction* function, |
| 557 String* name); | 571 String* name); |
| 558 | 572 |
| 559 private: | 573 private: |
| 560 const ParameterCount arguments_; | 574 const ParameterCount arguments_; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 573 Object* CompileConstructStub(SharedFunctionInfo* shared); | 587 Object* CompileConstructStub(SharedFunctionInfo* shared); |
| 574 | 588 |
| 575 private: | 589 private: |
| 576 Object* GetCode(); | 590 Object* GetCode(); |
| 577 }; | 591 }; |
| 578 | 592 |
| 579 | 593 |
| 580 } } // namespace v8::internal | 594 } } // namespace v8::internal |
| 581 | 595 |
| 582 #endif // V8_STUB_CACHE_H_ | 596 #endif // V8_STUB_CACHE_H_ |
| OLD | NEW |